aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 72c470fd42..a82f249267 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1061,8 +1061,10 @@ get_data_wrapper_text (CamelDataWrapper *wrapper)
charset = mail_config_get_default_charset ();
filter = camel_mime_filter_charset_new_convert (charset, "utf-8");
- camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (filter));
- camel_object_unref (CAMEL_OBJECT (filter));
+ if (filter) {
+ camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (filter));
+ camel_object_unref (CAMEL_OBJECT (filter));
+ }
}
camel_data_wrapper_write_to_stream (wrapper, CAMEL_STREAM (filtered_stream));