From: Richard Russon Date: Thu, 22 Aug 2019 10:22:21 +0000 (+0100) Subject: check for empty Context X-Git-Tag: 2019-10-25~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6873cc9dc7b33601d820a732d901f525d068beba;p=neomutt check for empty Context We'd already checked for an empty Context at the beginning of the `case` statement, but we didn't check after any functions that might have closed the Context. Fixes: #1799 --- diff --git a/index.c b/index.c index baeaf7309..9e67a2913 100644 --- a/index.c +++ b/index.c @@ -1938,7 +1938,7 @@ int mutt_index_menu(void) } /* check for a fatal error, or all messages deleted */ - if (mutt_buffer_is_empty(Context->mailbox->pathbuf)) + if (Context && Context->mailbox && mutt_buffer_is_empty(Context->mailbox->pathbuf)) ctx_free(&Context); /* if we were in the pager, redisplay the message */