diff options
author | Benjamin Otte <otte@redhat.com> | 2014-03-19 13:23:38 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-03-19 13:23:38 +0100 |
commit | 38d1999f7b292993f8b5b7b3ff156e8c4f624552 (patch) | |
tree | bb6ef391fbccabbdc0ea80317239e12680541d3e /gtk/gtkcontainer.c | |
parent | d5792eb1fe7209f1618e8d90e297f72a3e1f3e5b (diff) | |
download | gtk+-38d1999f7b292993f8b5b7b3ff156e8c4f624552.tar.gz |
container: guard container variable by reffing it
vte destroys the container during removal of a child. Don't crash in
that case due to recent a11y refactoring.
https://bugzilla.gnome.org/show_bug.cgi?id=726369
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index 1a99de3830..389e654546 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -1584,6 +1584,7 @@ gtk_container_remove (GtkContainer *container, g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container)); + g_object_ref (container); g_object_ref (widget); g_signal_emit (container, container_signals[REMOVE], 0, widget); @@ -1591,6 +1592,7 @@ gtk_container_remove (GtkContainer *container, _gtk_container_accessible_remove (GTK_WIDGET (container), widget); g_object_unref (widget); + g_object_unref (container); } void |