From: Jose Dapena Paz Date: Mon, 20 Jul 2009 10:15:27 +0000 (+0200) Subject: Another non checked return value in modest_attachments_view_set_message (fix 10 ... X-Git-Tag: 3.0.17-rc25~10 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=b0807b9f7bea9cdce9e43071c4976f4de226d5c3;hp=59f7322a82048968cbcf2822130ac9f24dee8b7f Another non checked return value in modest_attachments_view_set_message (fix 10 (last) for NB#126941) --- diff --git a/src/widgets/modest-attachments-view.c b/src/widgets/modest-attachments-view.c index a4476b9..f8ccd69 100644 --- a/src/widgets/modest-attachments-view.c +++ b/src/widgets/modest-attachments-view.c @@ -157,8 +157,14 @@ modest_attachments_view_set_message (ModestAttachmentsView *attachments_view, Tn part_to_check = modest_tny_msg_get_attachments_parent (TNY_MSG (msg)); - msg_content_type = modest_tny_mime_part_get_content_type (TNY_MIME_PART (part_to_check)); - is_alternate = !strcasecmp (msg_content_type, "multipart/alternative"); + if (part_to_check) { + msg_content_type = modest_tny_mime_part_get_content_type (TNY_MIME_PART (part_to_check)); + is_alternate = !strcasecmp (msg_content_type, "multipart/alternative"); + } else { + /* If we couldn't find parent, just go through fallback */ + msg_content_type = NULL; + is_alternate = FALSE; + } /* If the top mime part is a multipart/related, we don't show the attachments, as they're * embedded images in body */