settings: fix wrong assertion in keyfiles _storages_consolidate()
The storage may also contain a tombstone, and have no connection to steal.
This commit is contained in:
@@ -516,7 +516,6 @@ _storages_consolidate (NMSKeyfilePlugin *self,
|
||||
}
|
||||
|
||||
connection = nms_keyfile_storage_steal_connection (storage);
|
||||
nm_assert (NM_IS_CONNECTION (connection));
|
||||
|
||||
callback (NM_SETTINGS_PLUGIN (self),
|
||||
NM_SETTINGS_STORAGE (storage),
|
||||
|
@@ -55,7 +55,8 @@ NMConnection *
|
||||
nms_keyfile_storage_steal_connection (NMSKeyfileStorage *self)
|
||||
{
|
||||
nm_assert (NMS_IS_KEYFILE_STORAGE (self));
|
||||
nm_assert (NM_IS_CONNECTION (self->connection));
|
||||
nm_assert ( (!self->connection && self->is_tombstone)
|
||||
|| NM_IS_CONNECTION (self->connection));
|
||||
|
||||
return g_steal_pointer (&self->connection);
|
||||
}
|
||||
|
Reference in New Issue
Block a user