changeset 7349:63ef0998cd53 HEAD

If mail parsing was aborted (mail saving was aborted), don't even try to generate data to be cached to avoid crashes.
author Timo Sirainen <tss@iki.fi>
date Wed, 05 Mar 2008 02:04:29 +0200
parents 32d555a08443
children 51c72fdaadfd
files src/lib-storage/index/index-mail.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c	Wed Mar 05 02:03:50 2008 +0200
+++ b/src/lib-storage/index/index-mail.c	Wed Mar 05 02:04:29 2008 +0200
@@ -709,6 +709,12 @@
 					 MAIL_FETCH_MESSAGE_PARTS);
 		return;
 	}
+	if (mail->data.no_caching) {
+		/* if we're here because we aborted parsing, don't get any
+		   further or we may crash while generating output from
+		   incomplete data */
+		return;
+	}
 
 	(void)get_cached_msgpart_sizes(mail);