Commit fe74f80d authored by Lubomir Rintel's avatar Lubomir Rintel
Browse files

applet: avoid a crash on failure to get the secrets

If getting old secrets fails for whichever reason, get_existing_secrets_cb()
is called with error set and NULL settings (by keyring_find_secrets_cb()).
parent 4ca56482
......@@ -2866,8 +2866,10 @@ get_existing_secrets_cb (NMSecretAgentOld *agent,
NMADeviceClass *dclass;
GError *error = NULL;
/* Merge existing secrets into connection; ignore errors */
nm_connection_update_secrets (connection, req->setting_name, secrets, NULL);
if (secrets)
nm_connection_update_secrets (connection, req->setting_name, secrets, NULL);
else
nm_connection_clear_secrets (connection);
dclass = get_device_class_from_connection (connection, req->applet);
g_assert (dclass);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment