aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 7ded5ada60..8161f59f5b 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -870,9 +870,10 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h
camel_object_unref (stream);
charset = composer ? composer->charset : composer_get_default_charset_setting ();
- charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8");
- camel_stream_filter_add (filtered_stream, charenc);
- camel_object_unref (charenc);
+ if ((charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8"))) {
+ camel_stream_filter_add (filtered_stream, charenc);
+ camel_object_unref (charenc);
+ }
camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
camel_object_unref (filtered_stream);