]> granicus.if.org Git - neomutt/commitdiff
imap: fix crash when reopening mailbox
authorRichard Russon <rich@flatcap.org>
Tue, 6 Nov 2018 10:59:31 +0000 (10:59 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 6 Nov 2018 10:59:36 +0000 (10:59 +0000)
Thanks to @gahr for all the backtraces and debugging.

imap/imap.c

index e0202f16e6b60e812d904ef885ba1b8d7a62ab9d..9c74190c5843793fe168261634e90f174769ea9c 100644 (file)
@@ -2657,6 +2657,7 @@ static int imap_mbox_open(struct Context *ctx)
   m->hdrs = mutt_mem_calloc(count, sizeof(struct Email *));
   m->v2r = mutt_mem_calloc(count, sizeof(int));
   m->msg_count = 0;
+  m->vcount = 0;
 
   if (count && (imap_read_headers(adata, 1, count, true) < 0))
   {