libgimpconfig: fix previous commit to return the right error token

This commit is contained in:
Michael Natterer 2019-06-20 15:01:29 +02:00
parent f19844d0d1
commit d7d281bd97

View file

@ -720,13 +720,13 @@ gimp_config_deserialize_object (GValue *value,
if (! gimp_scanner_parse_string (scanner, &type_name))
return G_TOKEN_STRING;
if (! (type_name && *type_name))
{
{
g_scanner_error (scanner, "Type name is empty");
g_free (type_name);
return G_TOKEN_ERROR;
}
return G_TOKEN_NONE;
}
type = g_type_from_name (type_name);
g_free (type_name);