Commit 9782598b authored by Aleksander Morgado's avatar Aleksander Morgado
Browse files

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.

parent 1fc89735
...@@ -201,9 +201,9 @@ g_dbus_object_manager_client_finalize (GObject *object) ...@@ -201,9 +201,9 @@ g_dbus_object_manager_client_finalize (GObject *object)
if (manager->priv->control_proxy != NULL) if (manager->priv->control_proxy != NULL)
{ {
g_warn_if_fail (g_signal_handlers_disconnect_by_func (manager->priv->control_proxy, g_signal_handlers_disconnect_by_func (manager->priv->control_proxy,
on_control_proxy_g_signal, on_control_proxy_g_signal,
manager) == 1); manager);
g_object_unref (manager->priv->control_proxy); g_object_unref (manager->priv->control_proxy);
} }
g_object_unref (manager->priv->connection); g_object_unref (manager->priv->connection);
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