diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-14 01:42:25 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-14 01:42:25 +0800 |
commit | 04bb635647a0ba027cd8fb7268c453794770cad0 (patch) | |
tree | f2e9cc37d40fcc03b14d854913db95edea21ce39 /mail | |
parent | 6a6f4a88535e98fd056814a3bc54de445bf6997f (diff) | |
download | gsoc2013-evolution-04bb635647a0ba027cd8fb7268c453794770cad0.tar.gz gsoc2013-evolution-04bb635647a0ba027cd8fb7268c453794770cad0.tar.zst gsoc2013-evolution-04bb635647a0ba027cd8fb7268c453794770cad0.zip |
Make sure that the charset_filter is non-NULL before using it since iconv
2001-09-13 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (try_inline_pgp_sig): Make sure that the
charset_filter is non-NULL before using it since iconv may fail.
svn path=/trunk/; revision=12801
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-format.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a7be78d90b..286217b89a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-09-13 Jeffrey Stedfast <fejj@ximian.com> + + * mail-format.c (try_inline_pgp_sig): Make sure that the + charset_filter is non-NULL before using it since iconv may fail. + 2001-09-13 Larry Ewing <lewing@ximian.com> * mail-tools.c (mail_tool_quote_message): free the credits string. diff --git a/mail/mail-format.c b/mail/mail-format.c index 15780ae045..1b55640faa 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1475,9 +1475,12 @@ try_inline_pgp_sig (char *start, CamelMimePart *part, MailDisplay *md) if (!charset) charset = mail_config_get_default_charset (); - charset_filter = camel_mime_filter_charset_new_convert ("utf-8", charset); filtered_stream = camel_stream_filter_new_with_stream (ciphertext); - camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charset_filter)); + charset_filter = camel_mime_filter_charset_new_convert ("utf-8", charset); + if (charset_filter) { + camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (charset_filter)); + camel_object_unref (CAMEL_OBJECT (charset_filter)); + } camel_stream_write (CAMEL_STREAM (filtered_stream), pgp_start, sig_end - pgp_start); camel_stream_flush (CAMEL_STREAM (filtered_stream)); |