mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 05:18:23 +02:00
keyfile: assert in writer to have valid connection id
Few lines above we already verify the connection. We must have an @id.
This commit is contained in:
parent
72156ba1c5
commit
f6fba86984
1 changed files with 1 additions and 5 deletions
|
|
@ -822,11 +822,7 @@ _internal_write_connection (NMConnection *connection,
|
|||
}
|
||||
|
||||
id = nm_connection_get_id (connection);
|
||||
if (!id) {
|
||||
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
|
||||
"%s.%d: connection had no ID", __FILE__, __LINE__);
|
||||
return FALSE;
|
||||
}
|
||||
g_assert (id && *id);
|
||||
|
||||
info.keyfile = key_file = g_key_file_new ();
|
||||
info.keyfile_dir = keyfile_dir;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue