From: Richard Russon Date: Tue, 2 Oct 2018 10:25:50 +0000 (+0100) Subject: fix mailbox crash X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e565ea867711ea06b4c03383231390aa3f7da6c0;p=neomutt fix mailbox crash Mentioned in #1349 Thanks to @l29ah for the backtrace. --- diff --git a/pager.c b/pager.c index e1935a82b..b0a18fe25 100644 --- a/pager.c +++ b/pager.c @@ -2334,9 +2334,9 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e bool do_new_mail = false; - if (Context && !OptAttachMsg) + if (Context && Context->mailbox && !OptAttachMsg) { - oldcount = Context ? Context->mailbox->msg_count : 0; + oldcount = Context->mailbox->msg_count; /* check for new mail */ check = mx_mbox_check(Context, &index_hint); if (check < 0)