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:
Michael Natterer 2012-03-30 10:09:14 +02:00
parent 7cbd1c5739
commit 1556773582
1 changed files with 8 additions and 1 deletions

View File

@ -218,7 +218,12 @@ session_init (Gimp *gimp)
else
{
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))
@ -272,6 +277,8 @@ session_init (Gimp *gimp)
}
}
error:
if (token != G_TOKEN_LEFT_PAREN)
{
g_scanner_get_next_token (scanner);