Fix possible segmentation fault
authorMichael Rasmussen <mir@datanom.net>
Mon, 4 Mar 2019 23:12:33 +0000 (00:12 +0100)
committerMichael Rasmussen <mir@datanom.net>
Mon, 4 Mar 2019 23:12:33 +0000 (00:12 +0100)
Signed-off-by: Michael Rasmussen <mir@datanom.net>
src/etpan/imap-thread.c

index be5678c..b68e303 100644 (file)
@@ -3554,7 +3554,7 @@ void imap_threaded_cancel(Folder * folder)
        mailimap * imap;
        
        imap = get_imap(folder);
-       if (imap->imap_stream != NULL)
+       if (imap && imap->imap_stream != NULL)
                mailstream_cancel(imap->imap_stream);
 }