[gnome-control-center/gnome-3-38] applications: Fix NULL hash table being unreffed.
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-38] applications: Fix NULL hash table being unreffed.
- Date: Thu, 19 Nov 2020 23:45:38 +0000 (UTC)
commit f248e7353ecb3bbe4940e8a5d25c74f181bf0662
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Nov 10 09:45:47 2020 +1300
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 31570ec4b..8b632d450 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -1871,10 +1871,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]