diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2020-11-10 09:45:47 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2020-11-10 02:08:35 +0000 |
commit | b259d5207bd0f746b810e11aa559ebee99b12d18 (patch) | |
tree | b38c029a864cf68a19cfbf95acaced427606b76e | |
parent | 06eb07bbd665ca5492e398201aaa9911fe7f379b (diff) | |
download | gnome-control-center-b259d5207bd0f746b810e11aa559ebee99b12d18.tar.gz |
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
-rw-r--r-- | panels/applications/cc-applications-panel.c | 8 |
1 files 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); } |