summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-11-09 14:38:55 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-11-09 18:48:10 -0500
commit5379a4bf347cdaa2f8e9eba12fceb3c7419c882d (patch)
treefd1db94e1e891b30ba6d36dd4b3ffc87ad424b1e
parentb966f593a53ad2d5fd8a2dfc999e5cbf3b8b8bec (diff)
downloadgtk+-5379a4bf347cdaa2f8e9eba12fceb3c7419c882d.tar.gz
a11y: Clean up properly in unregister_object
Things that are set up in register_object should be cleaned up in unregister_object.
-rw-r--r--gtk/a11y/gtkatspicontext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/a11y/gtkatspicontext.c b/gtk/a11y/gtkatspicontext.c
index 7b3db2cf6b..98bde0a0e7 100644
--- a/gtk/a11y/gtkatspicontext.c
+++ b/gtk/a11y/gtkatspicontext.c
@@ -1387,9 +1387,11 @@ gtk_at_spi_context_unregister_object (GtkAtSpiContext *self)
self->registration_ids[self->n_registered_objects]);
self->registration_ids[self->n_registered_objects] = 0;
}
+
+ g_clear_pointer (&self->interfaces, g_variant_unref);
}
/* }}} */
-/* {{{ GObject boilerplate */
+/* {{{ GObject boilerplate */
static void
gtk_at_spi_context_finalize (GObject *gobject)
{
@@ -1399,7 +1401,6 @@ gtk_at_spi_context_finalize (GObject *gobject)
g_free (self->bus_address);
g_free (self->context_path);
- g_clear_pointer (&self->interfaces, g_variant_unref);
G_OBJECT_CLASS (gtk_at_spi_context_parent_class)->finalize (gobject);
}