]> granicus.if.org Git - mutt/commitdiff
imap-fetch-mail should check that there is a Context before dereferencing
authorMike Hallock <mhallock@scs.uiuc.edu>
Tue, 28 Mar 2006 18:04:21 +0000 (18:04 +0000)
committerMike Hallock <mhallock@scs.uiuc.edu>
Tue, 28 Mar 2006 18:04:21 +0000 (18:04 +0000)
Context->magic to avoid a segfault possibility.

curs_main.c

index 01c45db5d2c9f7e57581a41dd2c4db3b6e6c6bc8..c8f99fdab911d95b3e92182ee70ce0be76e393e8 100644 (file)
@@ -997,7 +997,7 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
 
 #ifdef USE_IMAP
       case OP_MAIN_IMAP_FETCH:
-       if (Context->magic == M_IMAP)
+       if (Context && Context->magic == M_IMAP)
          imap_check_mailbox (Context, &index_hint, 1);
         break;
 #endif