From: Thomas Roessler Date: Wed, 1 Mar 2000 11:58:02 +0000 (+0000) Subject: Don't crash with NULL Context pointers. X-Git-Tag: mutt-1-1-8-rel~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbc95c1fed11ac01de921d58c2d488ad5d775274;p=mutt Don't crash with NULL Context pointers. --- diff --git a/imap/util.c b/imap/util.c index 713e1990..94283671 100644 --- a/imap/util.c +++ b/imap/util.c @@ -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; }