gdbus: avoid warning when finalizing a GDBusObjectManagerClient
authorAleksander Morgado <aleksander@lanedo.com>
Thu, 27 Oct 2011 14:54:02 +0000 (16:54 +0200)
committerAleksander Morgado <aleksander@lanedo.com>
Thu, 27 Oct 2011 16:34:27 +0000 (18:34 +0200)
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

gio/gdbusobjectmanagerclient.c

index e9a3c93..e6f18bf 100644 (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);