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



commit 67f959bf9671901293b2cc2d3c1b494b80b7447c
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 5f53a87..a81043a 100644
--- a/panels/network/connection-editor/net-connection-editor.c
+++ b/panels/network/connection-editor/net-connection-editor.c
@@ -184,6 +184,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]