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: f0e3dfdace
(cherry picked from commit c8a649b3de)
This commit is contained in:
Thomas Haller
2017-01-24 15:41:05 +01:00
parent db6e8b21e4
commit e56d308ba5

View File

@@ -167,6 +167,7 @@ _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. */
if (nm_exported_object_is_exported (NM_EXPORTED_OBJECT (self)))
nm_exported_object_unexport (NM_EXPORTED_OBJECT (self));
}