]> granicus.if.org Git - neomutt/commitdiff
fix: don't crash when the imap connection dies
authorRichard Russon <rich@flatcap.org>
Fri, 4 Nov 2016 14:55:41 +0000 (14:55 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 4 Nov 2016 14:55:44 +0000 (14:55 +0000)
curs_main.c
pager.c

index fd9e932160c3c0451f1a599a5b8a19b938e12d3b..816b25e08035d78fed9c85cd607ed1c520ecdcc7 100644 (file)
@@ -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 d430c179286a16b17bd11e1cb05c9816cf7bf454..60a3c72253b167d108283c7045ebc1a592b377cc 100644 (file)
--- 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))