From: Sergio Villar Senin Date: Wed, 17 Dec 2008 11:11:19 +0000 (+0000) Subject: Fixes a crash when the message comes without a content type X-Git-Tag: git_migration_finished~919 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=4de051a995260caf9f4c46dbd8cc3b2340eab5a4 Fixes a crash when the message comes without a content type pmo-trunk-r6909 --- 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 */