From: Richard Russon Date: Fri, 4 Nov 2016 14:55:41 +0000 (+0000) Subject: fix: don't crash when the imap connection dies X-Git-Tag: neomutt-20161104~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18922784cb44613e67c32e2bc340a4eb424bea74;p=neomutt fix: don't crash when the imap connection dies --- diff --git a/curs_main.c b/curs_main.c index fd9e93216..816b25e08 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1938,7 +1938,8 @@ int mutt_index_menu (void) menu->menu = MENU_PAGER; menu->oldcurrent = menu->current; - update_index (menu, Context, MUTT_NEW_MAIL, Context->msgcount, index_hint); + if (Context) + update_index (menu, Context, MUTT_NEW_MAIL, Context->msgcount, index_hint); continue; diff --git a/pager.c b/pager.c index d430c1792..60a3c7225 100644 --- a/pager.c +++ b/pager.c @@ -2036,6 +2036,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra) FREE (&Context); redraw = REDRAW_FULL; ch = -1; + break; } } else if ((check == MUTT_NEW_MAIL) || (check == MUTT_REOPENED) || (check == MUTT_FLAGS))