app: don't set another scanner error after gimp_config_deserialize() failed
Setting errors on top of each other produces runtime warnings.
This commit is contained in:
@ -218,7 +218,12 @@ session_init (Gimp *gimp)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_object_unref (info);
|
g_object_unref (info);
|
||||||
break;
|
|
||||||
|
/* set token to left paren to we won't set another
|
||||||
|
* error below, gimp_config_deserialize() already did
|
||||||
|
*/
|
||||||
|
token = G_TOKEN_LEFT_PAREN;
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (scanner->value.v_symbol == GINT_TO_POINTER (HIDE_DOCKS))
|
else if (scanner->value.v_symbol == GINT_TO_POINTER (HIDE_DOCKS))
|
||||||
@ -272,6 +277,8 @@ session_init (Gimp *gimp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error:
|
||||||
|
|
||||||
if (token != G_TOKEN_LEFT_PAREN)
|
if (token != G_TOKEN_LEFT_PAREN)
|
||||||
{
|
{
|
||||||
g_scanner_get_next_token (scanner);
|
g_scanner_get_next_token (scanner);
|
||||||
|
Reference in New Issue
Block a user