diff options
author | Matthias Clasen <mclasen@redhat.com> | 2009-04-06 20:55:26 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2009-04-06 20:55:26 -0400 |
commit | 45894c9fad16886bd9c97adca150dd693ba0c806 (patch) | |
tree | 75a4f46ffd649facdcfd0175c6cb38bbe4e827e2 /gtk | |
parent | eeb3223802efcc43a7881406bbae24858b590917 (diff) | |
download | gdk-pixbuf-45894c9fad16886bd9c97adca150dd693ba0c806.tar.gz |
Fix a GtkBuilder crash
Always set an error when returning FALSE from gtk_builder_value_from_string.
This fixes the crash reported in bug 532858.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkbuilder.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 1ea7db3ac..9dff20e38 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -1329,7 +1329,14 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, g_value_take_boxed (value, vector); } else - ret = FALSE; + { + g_set_error (error, + GTK_BUILDER_ERROR, + GTK_BUILDER_ERROR_INVALID_VALUE, + "Could not parse '%s' as a %s", + string, G_VALUE_TYPE_NAME (value)); + ret = FALSE; + } break; case G_TYPE_OBJECT: if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF)) |