From 0e524f3ed0844843dfd04f6a72c469fd02493457 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 28 Sep 2001 15:33:45 +0000 Subject: Deal with camel_mime_filter_charset_new_convert returning NULL. (Every * mail-format.c (get_data_wrapper_text): Deal with camel_mime_filter_charset_new_convert returning NULL. (Every other call to it does, and something's wrong with iconv on the Sun right now so it keeps failing.) svn path=/trunk/; revision=13214 --- mail/ChangeLog | 7 +++++++ mail/mail-format.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index de3f37837a..8875ef7cb5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2001-09-28 Dan Winship + + * mail-format.c (get_data_wrapper_text): Deal with + camel_mime_filter_charset_new_convert returning NULL. (Every other + call to it does, and something's wrong with iconv on the Sun right + now so it keeps failing.) + 2001-09-27 Ettore Perazzoli * mail-mt.c (do_user_message): Always make the Cancel button the 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)); -- cgit