From 857f94304d12ded130300a36378e1a9d7feee4a3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Oct 2016 23:47:20 +0000 Subject: inbox: deal with ghost smsg smsg will be undef for ghost messages in a subsequent commit --- lib/PublicInbox/Inbox.pm | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3-24-ge0c7