fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-08-28 09:35 am

[dw-free] clean up error logs

[commit: http://hg.dwscoalition.org/dw-free/rev/0d57bab283f6]

http://bugs.dwscoalition.org/show_bug.cgi?id=2812

Short-circuit.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/NotificationItem.pm
--------------------------------------------------------------------------------
diff -r 4601594f5a34 -r 0d57bab283f6 cgi-bin/LJ/NotificationItem.pm
--- a/cgi-bin/LJ/NotificationItem.pm	Sat Aug 28 15:53:09 2010 +0800
+++ b/cgi-bin/LJ/NotificationItem.pm	Sat Aug 28 17:35:13 2010 +0800
@@ -192,6 +192,7 @@ sub unread {
 # delete this item from its inbox
 sub delete {
     my $self = shift;
+    return unless $self->owner;
     my $inbox = $self->owner->notification_inbox;
 
     # delete from the inbox so the inbox stays in sync
--------------------------------------------------------------------------------