From b259d5207bd0f746b810e11aa559ebee99b12d18 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 10 Nov 2020 09:45:47 +1300 Subject: [PATCH] applications: Fix NULL hash table being unreffed. When clicking away from the applications panel you can see: (gnome-control-center:95304): GLib-CRITICAL **: 09:12:52.941: g_hash_table_unref: assertion 'hash_table != NULL' failed --- panels/applications/cc-applications-panel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c index 19b477cfe..6b9a1c05b 100644 --- a/panels/applications/cc-applications-panel.c +++ b/panels/applications/cc-applications-panel.c @@ -1879,10 +1879,10 @@ cc_applications_panel_finalize (GObject *object) g_clear_object (&self->privacy_settings); g_clear_object (&self->search_settings); - g_free (self->current_app_id); - g_free (self->current_portal_app_id); - g_hash_table_unref (self->globs); - g_hash_table_unref (self->search_providers); + g_clear_pointer (&self->current_app_id, g_free); + g_clear_pointer (&self->current_portal_app_id, g_free); + g_clear_pointer (&self->globs, g_hash_table_unref); + g_clear_pointer (&self->search_providers, g_hash_table_unref); G_OBJECT_CLASS (cc_applications_panel_parent_class)->finalize (object); } -- GitLab