summary refs log tree commit diff
path: root/src/settings
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-01-25 21:09:50 +0100
committerMichael Biebl <biebl@debian.org>2017-01-25 21:09:50 +0100
commit7f4dff3943c64e1d0e5d13b2ac915088dde165e6 (patch)
treeabfbc3a4102d3bba349b3e25265c2213ad636954 /src/settings
parentd462f64d6044349b0a4e3581cf2c97bbab7aec97 (diff)
New upstream version 1.6.0 upstream/1.6.0
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/nm-settings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 6a920d5c..35790a12 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -1112,8 +1112,10 @@ claim_connection (NMSettings *self, NMSettingsConnection *connection)
 	openconnect_migrate_hack (NM_CONNECTION (connection));
 
 	g_object_ref (self);
-	g_signal_connect (connection, NM_SETTINGS_CONNECTION_REMOVED,
-	                  G_CALLBACK (connection_removed), self);
+	/* This one unexports the connection, it needs to run late to give the active
+	 * connection a chance to deal with its reference to this settings connection. */
+	g_signal_connect_after (connection, NM_SETTINGS_CONNECTION_REMOVED,
+	                        G_CALLBACK (connection_removed), self);
 	g_signal_connect (connection, NM_SETTINGS_CONNECTION_UPDATED_INTERNAL,
 	                  G_CALLBACK (connection_updated), self);
 	g_signal_connect (connection, "notify::" NM_SETTINGS_CONNECTION_VISIBLE,