We can't blindly assume a ghost even exists in the DB, as the
rules can change internally for some corner-case Message-IDs.
---
 lib/PublicInbox/Search.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 018fcb5..1398ea4 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -245,7 +245,7 @@ sub lookup_message {
 
 sub lookup_mail { # no ghosts!
        my ($self, $mid) = @_;
-       my $smsg = lookup_message($self, $mid);
+       my $smsg = lookup_message($self, $mid) or return;
        PublicInbox::SearchMsg->load_doc($smsg->{doc});
 }
 
-- 
EW

--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/

Reply via email to