about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-10-05 23:47:20 +0000
committerEric Wong <e@80x24.org>2016-10-05 23:52:43 +0000
commit857f94304d12ded130300a36378e1a9d7feee4a3 (patch)
tree62a62ce2d509b4958f26b3c63247ee5210126991 /lib/PublicInbox/Inbox.pm
parent76081da737b238c9ba9d4683571f04865e598c64 (diff)
downloadpublic-inbox-857f94304d12ded130300a36378e1a9d7feee4a3.tar.gz
smsg will be undef for ghost messages in a subsequent commit
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 414973c6..8c639082 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -211,6 +211,8 @@ sub msg_by_path ($$;$) {
 sub msg_by_smsg ($$;$) {
         my ($self, $smsg, $ref) = @_;
 
+        return unless defined $smsg; # ghost
+
         # backwards compat to fallback to msg_by_mid
         # TODO: remove if we bump SCHEMA_VERSION in Search.pm:
         defined(my $blob = $smsg->blob) or return msg_by_mid($self, $smsg->mid);