Commit e91266a8 authored by Benjamin Berg's avatar Benjamin Berg Committed by Georges Basile Stavracas Neto
Browse files

network: Fix crash on connection change after device removal

When a device is removed the callback handler could still be called
because it was connected using g_signal_connect rather than
g_signal_connect_object. This fixes crashes in the UI after a device has
been removed again.
parent ec50cbcd
......@@ -551,8 +551,8 @@ device_ethernet_constructed (GObject *object)
G_CALLBACK (add_profile), device);
client = net_object_get_client (NET_OBJECT (object));
g_signal_connect (client, NM_CLIENT_CONNECTION_ADDED,
G_CALLBACK (client_connection_added_cb), object);
g_signal_connect_object (client, NM_CLIENT_CONNECTION_ADDED,
G_CALLBACK (client_connection_added_cb), object, 0);
g_signal_connect_object (client, NM_CLIENT_CONNECTION_REMOVED,
G_CALLBACK (connection_removed), device, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment