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



commit beb668c97fa31a025374b947221ee941f0162356
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
    
    (cherry picked from commit 32af8903041fef276b63fe86770bb9a3e96f207e)

 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 8215cb3..2010b63 100644
--- a/src/connection-editor/page-wifi.c
+++ b/src/connection-editor/page-wifi.c
@@ -343,12 +343,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]