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 commitc8a649b3de
)
This commit is contained in:
@@ -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).
|
* 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
|
* 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. */
|
* 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));
|
nm_exported_object_unexport (NM_EXPORTED_OBJECT (self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user