Do not assume that every mime part has content type
authorSergio Villar Senín <svillar@igalia.com>
Wed, 16 Dec 2009 10:41:15 +0000 (11:41 +0100)
committerSergio Villar Senín <svillar@igalia.com>
Wed, 16 Dec 2009 10:46:14 +0000 (11:46 +0100)
Partially fixes NB#150565

PS: needs tinymail >= r4092

src/hildon2/modest-msg-view-window.c

index db1a8be..4e3303e 100644 (file)
@@ -2698,7 +2698,7 @@ on_decode_to_stream_async_handler (TnyMimePart *mime_part,
        set_progress_hint (helper->self, FALSE);
 
        content_type = tny_mime_part_get_content_type (mime_part);
        set_progress_hint (helper->self, FALSE);
 
        content_type = tny_mime_part_get_content_type (mime_part);
-       if (g_str_has_prefix (content_type, "message/rfc822")) {
+       if (content_type && g_str_has_prefix (content_type, "message/rfc822")) {
                ModestWindowMgr *mgr;
                ModestWindow *msg_win = NULL;
                TnyMsg * msg;
                ModestWindowMgr *mgr;
                ModestWindow *msg_win = NULL;
                TnyMsg * msg;