From 359ffdc6d4557e0af57a32d8fb47ee1bb9a1d360 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 13 Apr 2004 18:07:59 +0000 Subject: If we get an empty charset string from gconf, don't try to use the result 2004-04-13 Jeffrey Stedfast * mail-config.c (mail_config_signature_run_script): If we get an empty charset string from gconf, don't try to use the result to create a charset filter. Real fix for bug #51924. svn path=/trunk/; revision=25443 --- mail/ChangeLog | 4 ++++ mail/mail-config.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index fb7d2ca35b..f7e82314f4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,9 @@ 2004-04-13 Jeffrey Stedfast + * mail-config.c (mail_config_signature_run_script): If we get an + empty charset string from gconf, don't try to use the result to + create a charset filter. Real fix for bug #51924. + * mail-config.glade: Removed crackrock usage of GtkFixed as fillter. Also HIGified some other stuff. diff --git a/mail/mail-config.c b/mail/mail-config.c index 93aaa4f99d..b5989cfa4c 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -1144,9 +1144,12 @@ mail_config_signature_run_script (const char *script) camel_object_unref (stream); charset = gconf_client_get_string (config->gconf, "/apps/evolution/mail/composer/charset", NULL); - charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8"); - camel_stream_filter_add (filtered_stream, charenc); - camel_object_unref (charenc); + if (charset && *charset) { + if ((charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8"))) { + camel_stream_filter_add (filtered_stream, charenc); + camel_object_unref (charenc); + } + } g_free (charset); camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream); -- cgit v1.2.3