From 4de051a995260caf9f4c46dbd8cc3b2340eab5a4 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Wed, 17 Dec 2008 11:11:19 +0000 Subject: [PATCH] Fixes a crash when the message comes without a content type pmo-trunk-r6909 --- src/modest-tny-mime-part.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modest-tny-mime-part.c b/src/modest-tny-mime-part.c index e438f34..bd66d02 100644 --- a/src/modest-tny-mime-part.c +++ b/src/modest-tny-mime-part.c @@ -217,6 +217,10 @@ modest_tny_mime_part_get_headers_content_type (TnyMimePart *part) g_return_val_if_fail (TNY_IS_MIME_PART (part), NULL); header_content_type = modest_tny_mime_part_get_header_value (part, "Content-Type"); + + if (!header_content_type) + return NULL; + header_content_type = g_strstrip (header_content_type); /* remove the ; suffix */ -- 1.7.9.5