From f85322d23536c1004db8ddc722d4f2f6abc56aba Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 23 Apr 2019 11:10:33 +0200 Subject: [PATCH] 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: f034f17ff69c ('settings: keep the added connection alive for a bit longer') (cherry picked from commit 48ce3628c528553d4105ed443934d733998e81b4) (cherry picked from commit d80818e6cad94def1402be8326274bde998aa276) --- src/settings/nm-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 8e18a33e0..e594860bc 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1174,7 +1174,7 @@ pk_add_cb (NMAuthChain *chain, * 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 * 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"); -- 2.20.1