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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mail/em-format.c b/mail/em-format.c
index e331a03493..aef5bc0ebe 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -568,8 +568,11 @@ em_format_part_as(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const
g_free(basestr);
if (mime_type != NULL) {
- if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0)
+ if (g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0) {
emf->snoop_mime_type = mime_type = em_utils_snoop_type(part);
+ if (mime_type == NULL)
+ mime_type = "application/octet-stream";
+ }
handle = em_format_find_handler(emf, mime_type);
if (handle == NULL)