From 1556773582f55b10d0cf51c77a66f4bee8a53cff Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 30 Mar 2012 10:09:14 +0200 Subject: [PATCH] app: don't set another scanner error after gimp_config_deserialize() failed Setting errors on top of each other produces runtime warnings. --- app/gui/session.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/gui/session.c b/app/gui/session.c index 0487e057b8..721ede768e 100644 --- a/app/gui/session.c +++ b/app/gui/session.c @@ -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);