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
This commit is contained in:
Dan Winship
2003-05-04 19:11:39 +00:00
parent 5e5ab23a8c
commit a64932a775
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2003-05-02 Dan Winship <danw@ximian.com>
* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): Don't call
g_utf8_validate on an empty message. Fixes a warning.
2003-05-01 Jeffrey Stedfast <fejj@ximian.com>
Workaround for POS mailers like the one in bug #42045.

View File

@ -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);
}