From 18922784cb44613e67c32e2bc340a4eb424bea74 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 4 Nov 2016 14:55:41 +0000 Subject: [PATCH] fix: don't crash when the imap connection dies --- curs_main.c | 3 ++- pager.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.40.0