]> granicus.if.org Git - mutt/commitdiff
Don't crash with NULL Context pointers.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Mar 2000 11:58:02 +0000 (11:58 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 1 Mar 2000 11:58:02 +0000 (11:58 +0000)
imap/util.c

index 713e1990a62618b54f8e745794f6474374372d1b..94283671fc17f8bf61d91a729b9c9ee1b2b64a0e 100644 (file)
@@ -375,12 +375,12 @@ int imap_wait_keepalive (pid_t pid)
 
 void imap_allow_reopen (CONTEXT *ctx)
 {
-  if (ctx->magic == M_IMAP && CTX_DATA->selected_ctx == ctx)
+  if (ctx && ctx->magic == M_IMAP && CTX_DATA->selected_ctx == ctx)
     CTX_DATA->reopen |= IMAP_REOPEN_ALLOW;
 }
 
 void imap_disallow_reopen (CONTEXT *ctx)
 {
-  if (ctx->magic == M_IMAP && CTX_DATA->selected_ctx == ctx)
+  if (ctx && ctx->magic == M_IMAP && CTX_DATA->selected_ctx == ctx)
     CTX_DATA->reopen &= ~IMAP_REOPEN_ALLOW;
 }