(best_encoding): make sure we don't try to call iconv_open with a NULL

2001-07-06  Larry Ewing  <lewing@ximian.com>

	(best_encoding): make sure we don't try to call iconv_open with a
	NULL tocode.

svn path=/trunk/; revision=10872
This commit is contained in:
Larry Ewing
2001-07-06 22:20:34 +00:00
committed by Larry Ewing
parent 90f4c18deb
commit 2caec09b47
2 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,8 @@
2001-07-06 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c (autosave_manager_new): add missing static.
(best_encoding): make sure we don't try to call iconv_open with a
NULL tocode.
2001-07-06 Jeffrey Stedfast <fejj@ximian.com>

View File

@ -163,6 +163,9 @@ best_encoding (GByteArray *buf, const char *charset)
int status, count = 0;
iconv_t cd;
if (!charset)
return -1;
cd = iconv_open (charset, "utf-8");
g_return_val_if_fail (cd != (iconv_t)-1, -1);