From 17c1d1c0fd5c9150bb267a0480097cce0679ccaf Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 9 Apr 2003 05:55:45 +0000 Subject: NULL-protect the to/from charsets in the g_warning call. 2003-04-09 Jeffrey Stedfast * camel-mime-filter-charset.c (camel_mime_filter_charset_new_convert): NULL-protect the to/from charsets in the g_warning call. svn path=/trunk/; revision=20774 --- camel/ChangeLog | 6 ++++++ camel/camel-mime-filter-charset.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index b089b22def..6a875f547b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2003-04-09 Jeffrey Stedfast + + * camel-mime-filter-charset.c + (camel_mime_filter_charset_new_convert): NULL-protect the to/from + charsets in the g_warning call. + 2003-04-08 Jeffrey Stedfast Fixes for bug #40778. Probably others as well. diff --git a/camel/camel-mime-filter-charset.c b/camel/camel-mime-filter-charset.c index 6d5bb4f000..012f1897be 100644 --- a/camel/camel-mime-filter-charset.c +++ b/camel/camel-mime-filter-charset.c @@ -263,7 +263,9 @@ camel_mime_filter_charset_new_convert (const char *from_charset, const char *to_ new->ic = e_iconv_open (to_charset, from_charset); if (new->ic == (iconv_t) -1) { g_warning ("Cannot create charset conversion from %s to %s: %s", - from_charset, to_charset, g_strerror (errno)); + from_charset ? from_charset : "(null)", + to_charset ? to_charset : "(null)", + g_strerror (errno)); camel_object_unref (new); new = NULL; } else { -- cgit v1.2.3