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:
Thomas Haller 2014-11-28 18:37:25 +01:00
parent 72156ba1c5
commit f6fba86984

View file

@ -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;