[network-manager-applet] c-e: avoid crash by disconnecting signal in page-wifi



commit 32af8903041fef276b63fe86770bb9a3e96f207e
Author: Thomas Haller <thaller redhat com>
Date:   Mon Nov 6 12:58:57 2017 +0100

    c-e: avoid crash by disconnecting signal in page-wifi
    
    Open connection-editor for Wi-Fi connection, edit the
    Wi-Fi channel and leave the cursor inside the channel
    input field. Then press ESC to close the window.
    
    This lead to a crash:
    
      #4  0x0000000000428edd in channel_spin_input_cb (spin=0xc18f90 [GtkSpinButton], new_val=0x7fffffffc168, 
user_data=0xc0a490) at src/connection-editor/page-wifi.c:134

 src/connection-editor/page-wifi.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c
index 32a54b4..c6948a5 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -334,12 +334,14 @@ populate_ui (CEPageWifi *self)
        mode_combo_changed_cb (priv->mode, self);
        g_signal_connect (priv->mode, "changed", G_CALLBACK (mode_combo_changed_cb), self);
 
-       g_signal_connect (priv->channel, "output",
-                         G_CALLBACK (channel_spin_output_cb),
-                         self);
-       g_signal_connect (priv->channel, "input",
-                         G_CALLBACK (channel_spin_input_cb),
-                         self);
+       g_signal_connect_object (priv->channel, "output",
+                                G_CALLBACK (channel_spin_output_cb),
+                                self,
+                                0);
+       g_signal_connect_object (priv->channel, "input",
+                                G_CALLBACK (channel_spin_input_cb),
+                                self,
+                                0);
 
        gtk_widget_set_sensitive (GTK_WIDGET (priv->channel), FALSE);
        if (band) {


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