diff options
-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)); |