diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-11-12 14:49:16 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-11-12 21:46:05 +0000 |
commit | a59889a2746b1e6ff8cdeac585dcd91c9308fb18 (patch) | |
tree | d362447abb5896d4a21ad5783e50289177802b79 /gtk/gtkstack.c | |
parent | bfb054a02360c2b9d2acdd01a27701329933e8e3 (diff) | |
download | gtk+-a59889a2746b1e6ff8cdeac585dcd91c9308fb18.tar.gz |
Unrealize the ATContext in StackPage on dispose
Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.
Diffstat (limited to 'gtk/gtkstack.c')
-rw-r--r-- | gtk/gtkstack.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 3d70475ff9..7e92686c1c 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -280,6 +280,17 @@ gtk_stack_page_finalize (GObject *object) } static void +gtk_stack_page_dispose (GObject *object) +{ + GtkStackPage *page = GTK_STACK_PAGE (object); + + if (page->at_context != NULL) + gtk_at_context_unrealize (page->at_context); + + G_OBJECT_CLASS (gtk_stack_page_parent_class)->dispose (object); +} + +static void gtk_stack_page_get_property (GObject *object, guint property_id, GValue *value, @@ -379,6 +390,7 @@ gtk_stack_page_class_init (GtkStackPageClass *class) GObjectClass *object_class = G_OBJECT_CLASS (class); object_class->finalize = gtk_stack_page_finalize; + object_class->dispose = gtk_stack_page_dispose; object_class->get_property = gtk_stack_page_get_property; object_class->set_property = gtk_stack_page_set_property; |