From 15a0574562fc5ab13ca2e1d8baff754b7f9f6850 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 6 Aug 2010 15:11:06 +0100 Subject: [PATCH] lib-storage: Fixed mbox/cydir crashing on cache parsing deinit. --- src/lib-storage/index/index-mail.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib-storage/index/index-mail.c b/src/lib-storage/index/index-mail.c index c08392b536..0caaa42389 100644 --- a/src/lib-storage/index/index-mail.c +++ b/src/lib-storage/index/index-mail.c @@ -1405,6 +1405,11 @@ void index_mail_cache_parse_deinit(struct mail *_mail, time_t received_date, don't bother trying to update cache file */ mail->data.no_caching = TRUE; mail->data.forced_no_caching = TRUE; + + if (mail->data.parser_ctx == NULL) { + /* we didn't even start cache parsing */ + return; + } } /* This is needed with 0 byte mails to get hdr=NULL call done. */ -- 2.47.3