mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 09:28:54 +02:00
GDBusProxy: Check if connection is NULL before unreffing
If no connection can be established with the bus, it is possible that the GDBusPRoxy will be finalized without having a connection object.
This commit is contained in:
@@ -156,7 +156,8 @@ g_dbus_proxy_finalize (GObject *object)
|
|||||||
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
|
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
|
||||||
proxy->priv->signals_subscriber_id);
|
proxy->priv->signals_subscriber_id);
|
||||||
|
|
||||||
g_object_unref (proxy->priv->connection);
|
if (proxy->priv->connection != NULL)
|
||||||
|
g_object_unref (proxy->priv->connection);
|
||||||
g_free (proxy->priv->name);
|
g_free (proxy->priv->name);
|
||||||
g_free (proxy->priv->name_owner);
|
g_free (proxy->priv->name_owner);
|
||||||
g_free (proxy->priv->object_path);
|
g_free (proxy->priv->object_path);
|
||||||
|
Reference in New Issue
Block a user