From d06dd98d770514263c8dae716a9ae0d8244cbebc Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 13 Apr 2004 18:02:30 +0000 Subject: To be on the safe side (even though the real bug behind bug #51924 can't 2004-04-13 Jeffrey Stedfast * 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. svn path=/trunk/; revision=25442 --- composer/ChangeLog | 7 +++++++ composer/e-msg-composer.c | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'composer') 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 + + * 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 * 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); -- cgit