From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS43513 85.31.96.0/21 X-Spam-Status: No, score=-1.8 required=3.0 tests=AWL,BAYES_00,RCVD_IN_XBL, RDNS_NONE,SPF_FAIL,SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (unknown [85.31.101.98]) by dcvr.yhbt.net (Postfix) with ESMTP id B619020987 for ; Wed, 5 Oct 2016 01:47:36 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH 05/13] inbox: ghost smsg Date: Wed, 5 Oct 2016 01:46:54 +0000 Message-Id: <20161005014702.12626-6-e@80x24.org> In-Reply-To: <20161005014702.12626-1-e@80x24.org> References: <20161005014702.12626-1-e@80x24.org> List-Id: 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 414973c..8c63908 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); -- EW