changeset 2686:6e0a7083a880 HEAD

Don't crash if fetching ENVELOPE for expunged message.
author Timo Sirainen <tss@iki.fi>
date Tue, 05 Oct 2004 01:52:41 +0300
parents 52352a5859e4
children 482e1a1fe2ce
files src/lib-storage/index/index-mail-headers.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail-headers.c	Mon Oct 04 19:31:51 2004 +0300
+++ b/src/lib-storage/index/index-mail-headers.c	Tue Oct 05 01:52:41 2004 +0300
@@ -364,7 +364,7 @@
 	header_ctx = mailbox_header_lookup_init(&mail->ibox->box,
 						imap_envelope_headers);
 	stream = mail->mail.get_headers(&mail->mail, header_ctx);
-	if (mail->data.envelope == NULL) {
+	if (mail->data.envelope == NULL && stream != NULL) {
 		/* we got the headers from cache - parse them to get the
 		   envelope */
 		message_parse_header(NULL, stream, NULL,