]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
inbox: deal with ghost smsg
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 414973c6dedd9b6137852695092877cc0b62e7a1..8c639082a4189f6ad91cb3e0ec3a2e9612bc41d2 100644 (file)
@@ -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);