new_msg = create_reply_forward_mail (msg, header, from, signature, TRUE, reply_type,
attachments_list);
- if (attachments_list) {
+ if (attachments_list != NULL) {
g_list_foreach (attachments_list, (GFunc) g_object_unref, NULL);
g_list_free (attachments_list);
}
gboolean application_multipart = FALSE;
header_content_type = modest_tny_mime_part_get_header_value (TNY_MIME_PART (priv->msg), "Content-Type");
header_content_type = g_strstrip (header_content_type);
- header_content_type_lower = header_content_type?g_ascii_strdown (header_content_type, -1):NULL;
+ header_content_type_lower = (header_content_type ) ?
+ g_ascii_strdown (header_content_type, -1) : NULL;
- if (!strstr (header_content_type_lower, "application/"))
+ if ((header_content_type_lower != NULL) &&
+ !strstr (header_content_type_lower, "application/")) {
application_multipart = TRUE;
-
+ g_free (header_content_type_lower);
+ }
g_free (header_content_type);
- g_free (header_content_type_lower);
+
if (application_multipart) {
gtk_widget_queue_draw (GTK_WIDGET (attachments_view));
return;