aboutsummaryrefslogtreecommitdiff
path: root/lib/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/imap.c')
-rw-r--r--lib/imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 9a845102a..864bb2270 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1982,7 +1982,7 @@ static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
/* The IMAP session may or may not have been allocated/setup at this
point! */
- if(!dead_connection && imapc->pp.conn)
+ if(!dead_connection && imapc->pp.conn && imapc->pp.conn->bits.protoconnstart)
if(!imap_perform_logout(conn))
(void)imap_block_statemach(conn); /* ignore errors on LOGOUT */