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().
This commit is contained in:
Emmanuele Bassi 2023-02-03 17:11:22 +01:00
parent b710df6f45
commit 341ecab41a

View File

@ -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);
}