aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format.c')
-rw-r--r--mail/em-format.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/em-format.c b/mail/em-format.c
index 2ba834b9d6..9ffc37fc29 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -515,9 +515,12 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
dw = camel_medium_get_content_object((CamelMedium *)part);
mime_type = camel_data_wrapper_get_mime_type(dw);
- camel_strdown(mime_type);
- em_format_part_as(emf, stream, part, mime_type);
- g_free(mime_type);
+ if (mime_type) {
+ camel_strdown(mime_type);
+ em_format_part_as(emf, stream, part, mime_type);
+ g_free(mime_type);
+ } else
+ em_format_part_as(emf, stream, part, "text/plain");
}
static void