mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Check that error exists before trying to set it. Fixes bug #640975.
This commit is contained in:
parent
72a8282231
commit
401a4233e4
@ -769,13 +769,14 @@ g_convert_with_iconv (const gchar *str,
|
||||
have_error = TRUE;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
int errsv = errno;
|
||||
|
||||
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
|
||||
_("Error during conversion: %s"),
|
||||
g_strerror (errsv));
|
||||
}
|
||||
if (error)
|
||||
{
|
||||
int errsv = errno;
|
||||
|
||||
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
|
||||
_("Error during conversion: %s"),
|
||||
g_strerror (errsv));
|
||||
}
|
||||
have_error = TRUE;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user