[gnome-control-center] network: Fix warnings after removing a VPN
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Fix warnings after removing a VPN
- Date: Thu, 28 Nov 2019 13:43:44 +0000 (UTC)
commit c37ab4032b2b74b24dfede356e5b351619f354f8
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Nov 13 09:56:19 2019 +1300
network: Fix warnings after removing a VPN
This is due to the object being accessed after being unreffed - connect the signal
so it is removed when the object is finalized.
This regression was introduced in 93a269f8 when switching to GtkTemplate.
panels/network/net-vpn.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/panels/network/net-vpn.c b/panels/network/net-vpn.c
index b350e0de4..97925b80f 100644
--- a/panels/network/net-vpn.c
+++ b/panels/network/net-vpn.c
@@ -146,7 +146,6 @@ static void
editor_done (NetVpn *self)
{
nm_device_refresh_vpn_ui (self);
- g_object_unref (self);
}
static void
@@ -164,7 +163,7 @@ edit_connection (NetVpn *self)
title = g_strdup_printf (_("%s VPN"), nm_connection_get_id (self->connection));
net_connection_editor_set_title (editor, title);
- g_signal_connect_swapped (editor, "done", G_CALLBACK (editor_done), g_object_ref (self));
+ g_signal_connect_object (editor, "done", G_CALLBACK (editor_done), self, G_CONNECT_SWAPPED);
net_connection_editor_run (editor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]