[gimp/metadata-browser] app: don't set another scanner error after gimp_config_deserialize() failed
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: don't set another scanner error after gimp_config_deserialize() failed
- Date: Wed, 12 Sep 2012 23:01:18 +0000 (UTC)
commit d7448c1efa12918a728345f5fd059115b3ea6a0a
Author: Michael Natterer <mitch gimp org>
Date: Fri Mar 30 10:09:14 2012 +0200
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 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/gui/session.c b/app/gui/session.c
index 0487e05..721ede7 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]