From a64932a7754dcbc5d10fd77ecce959eb32e642cd Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 4 May 2003 19:11:39 +0000 Subject: Don't call g_utf8_validate on an empty message. Fixes a warning. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Don't call g_utf8_validate on an empty message. Fixes a warning. svn path=/trunk/; revision=21099 --- camel/camel-mime-part-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'camel/camel-mime-part-utils.c') diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index 33442f2b20..a3a5d390a4 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -393,7 +393,7 @@ simple_data_wrapper_construct_from_parser (CamelDataWrapper *dw, CamelMimeParser /* we're not even going to bother trying to convert, so set the rawtext bit to TRUE and let the mailer deal with it. */ dw->rawtext = TRUE; - } else if (!strcasecmp (charset, "utf-8")) { + } else if (!strcasecmp (charset, "utf-8") && buffer->len) { /* check that it is valid utf8 */ dw->rawtext = !g_utf8_validate (buffer->data, buffer->len, NULL); } -- cgit v1.2.3