Blame SOURCES/0004-network-Fix-a-crash-when-clicking-to-forget-a-VPN-on.patch

ea7a08
From 2e7b23aa0019cd04e602be9c4838f458c97d9652 Mon Sep 17 00:00:00 2001
ea7a08
From: Rui Matos <tiagomatos@gmail.com>
ea7a08
Date: Tue, 26 Jan 2016 16:30:54 +0100
ea7a08
Subject: [PATCH 4/4] network: Fix a crash when clicking to forget a VPN on the
ea7a08
 editor
ea7a08
ea7a08
We need to keep a reference to the NetVpn instance or it might already
ea7a08
be finalized when the editor window closes.
ea7a08
---
ea7a08
 panels/network/net-vpn.c | 3 ++-
ea7a08
 1 file changed, 2 insertions(+), 1 deletion(-)
ea7a08
ea7a08
diff --git a/panels/network/net-vpn.c b/panels/network/net-vpn.c
ea7a08
index c6fdda1..94c1c10 100644
ea7a08
--- a/panels/network/net-vpn.c
ea7a08
+++ b/panels/network/net-vpn.c
ea7a08
@@ -406,6 +406,7 @@ editor_done (NetConnectionEditor *editor,
ea7a08
 {
ea7a08
         g_object_unref (editor);
ea7a08
         net_object_refresh (NET_OBJECT (vpn));
ea7a08
+        g_object_unref (vpn);
ea7a08
 }
ea7a08
 
ea7a08
 static void
ea7a08
@@ -432,7 +433,7 @@ vpn_proxy_edit (NetObject *object)
ea7a08
         net_connection_editor_set_title (editor, title);
ea7a08
         g_free (title);
ea7a08
 
ea7a08
-        g_signal_connect (editor, "done", G_CALLBACK (editor_done), vpn);
ea7a08
+        g_signal_connect (editor, "done", G_CALLBACK (editor_done), g_object_ref (vpn));
ea7a08
         net_connection_editor_run (editor);
ea7a08
 }
ea7a08
 
ea7a08
-- 
ea7a08
2.7.4
ea7a08