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:47:45 +0000 (11:47 +0100)
Partially fixes NB#150565

PS: needs tinymail >= r4092

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

index 66f04b2..1a5efd5 100644 (file)
@@ -2718,7 +2718,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);
-       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;