Commit d80818e6 authored by Beniamino Galvani's avatar Beniamino Galvani

settings: fix failed assertion

Fix the following assertion failure:

  g_object_ref: assertion 'G_IS_OBJECT (object)' failed.

nm_settings_add_connection() can return a NULL connection.

Fixes: f034f17f ('settings: keep the added connection alive for a bit longer')
(cherry picked from commit 48ce3628)
parent 5a1818b6
...@@ -1174,7 +1174,7 @@ pk_add_cb (NMAuthChain *chain, ...@@ -1174,7 +1174,7 @@ pk_add_cb (NMAuthChain *chain,
* because it's found to be incompatible with the device on AddAndActivate). * because it's found to be incompatible with the device on AddAndActivate).
* But we need to keep it alive for a bit longer, precisely to check wehther * But we need to keep it alive for a bit longer, precisely to check wehther
* it's still known to the setting manager. */ * it's still known to the setting manager. */
g_object_ref (added); nm_g_object_ref (added);
} }
callback = nm_auth_chain_get_data (chain, "callback"); callback = nm_auth_chain_get_data (chain, "callback");
......
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