gdbus: avoid warning when finalizing a GDBusObjectManagerClient

If the GDBusObjectManagerClient doesn't get a name owner during its lifetime,
`on_control_proxy_g_signal' will never be connected to any signal, so we
shouldn't dump any warning in that case.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=662858
This commit is contained in:
Aleksander Morgado 2011-10-27 16:54:02 +02:00
parent 1fc897352e
commit 9782598b81

View File

@ -201,9 +201,9 @@ g_dbus_object_manager_client_finalize (GObject *object)
if (manager->priv->control_proxy != NULL)
{
g_warn_if_fail (g_signal_handlers_disconnect_by_func (manager->priv->control_proxy,
on_control_proxy_g_signal,
manager) == 1);
g_signal_handlers_disconnect_by_func (manager->priv->control_proxy,
on_control_proxy_g_signal,
manager);
g_object_unref (manager->priv->control_proxy);
}
g_object_unref (manager->priv->connection);