[gnome-control-center] network: Disconnect from signal on finalize



commit e267515ed61690faf0532f3108d61c9b56c724c8
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Sep 7 14:38:41 2013 -0300

    network: Disconnect from signal on finalize
    
    The connection editor connects to permission-changed on its NMClient,
    but didn't disconnect from that signal when dropping the NMClient
    reference in finalize.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700989

 .../connection-editor/net-connection-editor.c      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/connection-editor/net-connection-editor.c 
b/panels/network/connection-editor/net-connection-editor.c
index a645c57..98d7e44 100644
--- a/panels/network/connection-editor/net-connection-editor.c
+++ b/panels/network/connection-editor/net-connection-editor.c
@@ -182,6 +182,8 @@ net_connection_editor_finalize (GObject *object)
 {
         NetConnectionEditor *editor = NET_CONNECTION_EDITOR (object);
 
+        if (editor->permission_id > 0 && editor->client)
+                g_signal_handler_disconnect (editor->client, editor->permission_id);
         g_clear_object (&editor->connection);
         g_clear_object (&editor->orig_connection);
         if (editor->window) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]