POP3Aggregator: check whether we already have a session or not before attempting...
authorWilfried Goesgens <dothebart@citadel.org>
Fri, 22 Feb 2013 11:40:22 +0000 (12:40 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 25 Feb 2013 19:02:12 +0000 (20:02 +0100)
citadel/modules/pop3client/serv_pop3client.c

index e5ba9bf3e1a30a330296f54596493454dd53be99..c97207540db9e30f4b1c2f40aa023192e1b9af37 100644 (file)
@@ -197,8 +197,10 @@ void DeletePOP3Aggregator(void *vptr)
        FreeStrBuf(&ptr->IO.SendBuf.Buf);
        FreeStrBuf(&ptr->IO.RecvBuf.Buf);
        DeleteAsyncMsg(&ptr->IO.ReadMsg);
-       ((struct CitContext*)ptr->IO.CitContext)->state = CON_IDLE;
-       ((struct CitContext*)ptr->IO.CitContext)->kill_me = 1;
+       if (((struct CitContext*)ptr->IO.CitContext)) {
+               ((struct CitContext*)ptr->IO.CitContext)->state = CON_IDLE;
+               ((struct CitContext*)ptr->IO.CitContext)->kill_me = 1;
+       }
        FreeAsyncIOContents(&ptr->IO);
        free(ptr);
 }