From dbc95c1fed11ac01de921d58c2d488ad5d775274 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 1 Mar 2000 11:58:02 +0000 Subject: [PATCH] Don't crash with NULL Context pointers. --- imap/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.40.0