charsets: don't crash when passing a NULL string to the UTF-8 converter
This commit is contained in:

committed by
Dan Williams

parent
7b4d6cf605
commit
1db0004033
@@ -714,6 +714,9 @@ mm_charset_take_and_convert_to_utf8 (gchar *str,
|
|||||||
{
|
{
|
||||||
gchar *utf8 = NULL;
|
gchar *utf8 = NULL;
|
||||||
|
|
||||||
|
if (!str)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
switch (charset) {
|
switch (charset) {
|
||||||
case MM_MODEM_CHARSET_UNKNOWN:
|
case MM_MODEM_CHARSET_UNKNOWN:
|
||||||
g_warn_if_reached ();
|
g_warn_if_reached ();
|
||||||
|
Reference in New Issue
Block a user