[gnome-control-center/gnome-3-14] network: Fix a crash when clicking to forget a VPN on the editor
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-14] network: Fix a crash when clicking to forget a VPN on the editor
- Date: Tue, 26 Apr 2016 11:03:54 +0000 (UTC)
commit f8a3b85be1e0bbd96297032c2d5b315462666799
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Jan 26 16:30:54 2016 +0100
network: Fix a crash when clicking to forget a VPN on the editor
We need to keep a reference to the NetVpn instance or it might already
be finalized when the editor window closes.
panels/network/net-vpn.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/panels/network/net-vpn.c b/panels/network/net-vpn.c
index c6fdda1..94c1c10 100644
--- a/panels/network/net-vpn.c
+++ b/panels/network/net-vpn.c
@@ -406,6 +406,7 @@ editor_done (NetConnectionEditor *editor,
{
g_object_unref (editor);
net_object_refresh (NET_OBJECT (vpn));
+ g_object_unref (vpn);
}
static void
@@ -432,7 +433,7 @@ vpn_proxy_edit (NetObject *object)
net_connection_editor_set_title (editor, title);
g_free (title);
- g_signal_connect (editor, "done", G_CALLBACK (editor_done), vpn);
+ g_signal_connect (editor, "done", G_CALLBACK (editor_done), g_object_ref (vpn));
net_connection_editor_run (editor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]