From e56d308ba59a04dd9d6a83729f5f3dbd55d9cab6 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 24 Jan 2017 15:41:05 +0100 Subject: [PATCH] core: avoid unexporting active-connection that is not exported For better or worse, nm_exported_object_unexport() asserts that the object is currently exported. It's not clear that an active connection at this place is always exported. Fixes: f0e3dfdace25bf19c6a6b1f1cee4e384de64c433 (cherry picked from commit c8a649b3ded70f63e5f3f7f3f75282d4cd8b0590) --- src/nm-active-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index 625c19e83..c42841a93 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -167,7 +167,8 @@ _settings_connection_removed (NMSettingsConnection *connection, * re-link; in that case we'd just clean the references to the old connection here). * Let's remove ourselves from the bus so that we're not exposed with a dangling * reference to the setting connection once it's gone. */ - nm_exported_object_unexport (NM_EXPORTED_OBJECT (self)); + if (nm_exported_object_is_exported (NM_EXPORTED_OBJECT (self))) + nm_exported_object_unexport (NM_EXPORTED_OBJECT (self)); } static void