aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-config.c9
2 files changed, 10 insertions, 3 deletions
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 <fejj@ximian.com>
+ * 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);