]> granicus.if.org Git - neomutt/commitdiff
imap: handle case where adata->mailbox is NULL
authorMehdi Abaakouk <sileht@sileht.net>
Wed, 28 Nov 2018 20:50:02 +0000 (21:50 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 29 Nov 2018 13:04:44 +0000 (13:04 +0000)
When selected mailbox in unsubscribed, adata->mailbox may be NULL.

make imap_cmd_finish() handles it.

Closes #1460

imap/command.c

index 603570fd17eb97cef10438254bad51d7c38eff6c..0332a0a74a0a17459be6731fa7ad309b5ffd281d 100644 (file)
@@ -1305,7 +1305,7 @@ void imap_cmd_finish(struct ImapAccountData *adata)
 
   adata->closing = false;
 
-  struct ImapMboxData *mdata = adata->mailbox->mdata;
+  struct ImapMboxData *mdata = imap_mdata_get(adata->mailbox);
 
   if (mdata && mdata->reopen & IMAP_REOPEN_ALLOW)
   {