aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog7
-rw-r--r--composer/e-msg-composer.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 06aa4ce83a..b4c712c175 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-13 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer.c (get_file_content): To be on the safe side
+ (even though the real bug behind bug #51924 can't happen here),
+ protect against adding a NULL charset filter tot he filtered
+ stream.
+
2004-04-13 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (drag_data_received): accept text/calendar
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);