Blame SOURCES/0001-network-Use-g_signal_connect_object-when-dealing-wit.patch

9b746a
From 06b1f439c05a20b790cebb850d8ba514249583c4 Mon Sep 17 00:00:00 2001
9b746a
From: Carlos Garnacho <carlosg@gnome.org>
9b746a
Date: Tue, 3 Dec 2019 16:56:59 +0100
9b746a
Subject: [PATCH] network: Use g_signal_connect_object() when dealing with
9b746a
 NMClient
9b746a
9b746a
We may get signal emissions and property changes during NMClient
9b746a
destruction, triggered from CcWifiPanel destruction. This triggers
9b746a
callbacks that were not meant to trigger on panel destruction.
9b746a
---
9b746a
 panels/network/cc-wifi-panel.c | 28 ++++++++++++++--------------
9b746a
 1 file changed, 14 insertions(+), 14 deletions(-)
9b746a
9b746a
diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
9b746a
index 2c1cd17b7..7dd182e59 100644
9b746a
--- a/panels/network/cc-wifi-panel.c
9b746a
+++ b/panels/network/cc-wifi-panel.c
9b746a
@@ -621,20 +621,20 @@ cc_wifi_panel_init (CcWifiPanel *self)
9b746a
   /* Load NetworkManager */
9b746a
   self->client = nm_client_new (NULL, NULL);
9b746a
 
9b746a
-  g_signal_connect (self->client,
9b746a
-                    "device-added",
9b746a
-                    G_CALLBACK (device_added_cb),
9b746a
-                    self);
9b746a
-
9b746a
-  g_signal_connect (self->client,
9b746a
-                    "device-removed",
9b746a
-                    G_CALLBACK (device_removed_cb),
9b746a
-                    self);
9b746a
-
9b746a
-  g_signal_connect (self->client,
9b746a
-                    "notify::wireless-enabled",
9b746a
-                    G_CALLBACK (wireless_enabled_cb),
9b746a
-                    self);
9b746a
+  g_signal_connect_object (self->client,
9b746a
+                           "device-added",
9b746a
+                           G_CALLBACK (device_added_cb),
9b746a
+                           self, 0);
9b746a
+
9b746a
+  g_signal_connect_object (self->client,
9b746a
+                           "device-removed",
9b746a
+                           G_CALLBACK (device_removed_cb),
9b746a
+                           self, 0);
9b746a
+
9b746a
+  g_signal_connect_object (self->client,
9b746a
+                           "notify::wireless-enabled",
9b746a
+                           G_CALLBACK (wireless_enabled_cb),
9b746a
+                           self, 0);
9b746a
 
9b746a
   /* Load Wi-Fi devices */
9b746a
   load_wifi_devices (self);
9b746a
-- 
9b746a
2.24.0
9b746a