settings: fix failed assertion 'owner != NULL in nm-agent-manager.c

Let NMSecretAgent emit the 'disconnected' event when dbus_owner is
still valid so that receivers of the signal can query it. This fixes
the following failed assertion:

    remove_agent: assertion 'owner != NULL' failed

Fixes: 2a2fd1216b
This commit is contained in:
Beniamino Galvani 2015-07-30 14:38:36 +02:00
parent 3e39e5b4f0
commit d1b6835ada

View file

@ -483,9 +483,9 @@ proxy_cleanup (NMSecretAgent *self)
g_clear_object (&priv->proxy);
g_signal_handlers_disconnect_by_func (nm_bus_manager_get (), name_owner_changed_cb, self);
g_clear_pointer (&priv->dbus_owner, g_free);
g_signal_emit (self, signals[DISCONNECTED], 0);
g_clear_pointer (&priv->dbus_owner, g_free);
}
}