diff options
Diffstat (limited to 'imap/imap.c')
-rw-r--r-- | imap/imap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/imap/imap.c b/imap/imap.c index 33aa7495..d9e5a40e 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -650,7 +650,12 @@ int imap_open_mailbox (CONTEXT* ctx) ctx->hdrs = safe_malloc (count * sizeof (HEADER *)); ctx->v2r = safe_malloc (count * sizeof (int)); ctx->msgcount = 0; - count = imap_read_headers (idata, 0, count - 1) + 1; + if (imap_read_headers (idata, 0, count - 1) < 0) + { + mutt_error _("Error opening mailbox"); + mutt_sleep (1); + goto fail; + } dprint (2, (debugfile, "imap_open_mailbox: msgcount is %d\n", ctx->msgcount)); FREE (&mx.mbox); |