From 6a48e47424f06cc2bf2bbff0f580367b089d2d26 Mon Sep 17 00:00:00 2001 From: Robert McQueen Date: Fri, 27 Jan 2006 15:06:55 +0000 Subject: 2006-01-27 Iain Holmes * glib/dbus-gproxy.c (dbus_g_proxy_dispose): Protect the dispose method from being called multiple times. --- ChangeLog | 5 +++++ glib/dbus-gproxy.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 825ad957..33a58cf2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-27 Iain Holmes + + * glib/dbus-gproxy.c (dbus_g_proxy_dispose): Protect the dispose + method from being called multiple times. + 2006-01-19 Robert McQueen * glib/dbus-binding-tool-glib.c: Patch from Rob Taylor diff --git a/glib/dbus-gproxy.c b/glib/dbus-gproxy.c index f8157b2d..f83dac58 100644 --- a/glib/dbus-gproxy.c +++ b/glib/dbus-gproxy.c @@ -1395,10 +1395,15 @@ dbus_g_proxy_dispose (GObject *object) DBusGProxy *proxy = DBUS_G_PROXY (object); DBusGProxyPrivate *priv = DBUS_G_PROXY_GET_PRIVATE(proxy); + if (priv->pending_calls == NULL) + { + return; + } /* Cancel outgoing pending calls */ g_hash_table_foreach (priv->pending_calls, cancel_pending_call, proxy); g_hash_table_destroy (priv->pending_calls); + priv->pending_calls = NULL; if (priv->manager && proxy != priv->manager->bus_proxy) { -- cgit