projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
789b341
)
GDBusProxy: Check if connection is NULL before unreffing
author
Olivier Crête
<olivier.crete@collabora.co.uk>
Mon, 14 Mar 2011 18:54:46 +0000
(14:54 -0400)
committer
Olivier Crête
<olivier.crete@collabora.co.uk>
Mon, 14 Mar 2011 19:49:02 +0000
(15:49 -0400)
If no connection can be established with the bus, it is possible that
the GDBusPRoxy will be finalized without having a connection object.
gio/gdbusproxy.c
patch
|
blob
|
history
diff --git
a/gio/gdbusproxy.c
b/gio/gdbusproxy.c
index
98bd758
..
06957f6
100644
(file)
--- a/
gio/gdbusproxy.c
+++ b/
gio/gdbusproxy.c
@@
-156,7
+156,8
@@
g_dbus_proxy_finalize (GObject *object)
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
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_owner);
g_free (proxy->priv->object_path);