diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2023-02-03 17:11:22 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2023-02-03 17:11:22 +0100 |
commit | 341ecab41a5bc174c2e6dbdeedf1cdd88a86f84b (patch) | |
tree | aa6924dd3b2c7e1e980742b6fac7b406b73ee02c | |
parent | b710df6f45047a5a48345b51d5951975143a9681 (diff) | |
download | gtk+-341ecab41a5bc174c2e6dbdeedf1cdd88a86f84b.tar.gz |
a11y: Clear the GtkATContext in a single step
There's no need to unrealize the GtkATContext inside dispose() and then
drop its reference inside finalize().
-rw-r--r-- | gtk/gtkstack.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 4b9ccc1aa0..64bc3ae7d0 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -337,8 +337,6 @@ gtk_stack_page_finalize (GObject *object) g_object_remove_weak_pointer (G_OBJECT (page->last_focus), (gpointer *)&page->last_focus); - g_clear_object (&page->at_context); - G_OBJECT_CLASS (gtk_stack_page_parent_class)->finalize (object); } @@ -347,8 +345,7 @@ 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_clear_object (&page->at_context); G_OBJECT_CLASS (gtk_stack_page_parent_class)->dispose (object); } |