gio: Use g_steal_handle_id() with signal unsubscriptions

This makes no functional changes, but does tidy the code up a bit and
means `g_steal_handle_id()` gets a bit more testing.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2024-10-08 13:55:22 +01:00
parent da5ce72171
commit 6b15af3c4c
15 changed files with 38 additions and 62 deletions

View File

@@ -198,15 +198,15 @@ g_dbus_proxy_finalize (GObject *object)
if (proxy->priv->name_owner_changed_subscription_id > 0)
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->name_owner_changed_subscription_id);
g_steal_handle_id (&proxy->priv->name_owner_changed_subscription_id));
if (proxy->priv->properties_changed_subscription_id > 0)
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->properties_changed_subscription_id);
g_steal_handle_id (&proxy->priv->properties_changed_subscription_id));
if (proxy->priv->signals_subscription_id > 0)
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->signals_subscription_id);
g_steal_handle_id (&proxy->priv->signals_subscription_id));
if (proxy->priv->connection != NULL)
g_object_unref (proxy->priv->connection);