From ca49f57b90fe9d7a53058cc9abf837c8efec395c Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 7 Mar 2000 10:34:37 +0000 Subject: [PATCH] Fix NULL pointer deferences. --- curs_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curs_main.c b/curs_main.c index b2d5938c..99b753a2 100644 --- a/curs_main.c +++ b/curs_main.c @@ -777,7 +777,7 @@ int mutt_index_menu (void) if (Context && Context->magic == M_IMAP) imap_set_logout (Context); #endif - oldcount = Context->msgcount; + oldcount = Context ? Context->msgcount : 0; if (!Context || (check = mx_close_mailbox (Context, &index_hint)) == 0) done = 1; @@ -951,7 +951,7 @@ int mutt_index_menu (void) int check; mutt_str_replace (&LastFolder, Context->path); - oldcount = Context->msgcount; + oldcount = Context ? Context->msgcount : 0; if ((check = mx_close_mailbox (Context, &index_hint)) != 0) { -- 2.40.0