aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-05 16:18:45 -0500
committerTed Gould <ted@gould.cx>2011-04-05 16:18:45 -0500
commitd9615c247888582ce6bfd54e4df9123d22226f4b (patch)
treeacfb4d94e5b274359c0c81047a58af144d373dd5
parent10231dc35151f39cc8f8c22430d8d63ced483ff7 (diff)
parent57f6e7f1f7e7ecc00b46f5cb97ddd8f771d048d2 (diff)
downloadlibdbusmenu-d9615c247888582ce6bfd54e4df9123d22226f4b.tar.gz
libdbusmenu-d9615c247888582ce6bfd54e4df9123d22226f4b.tar.bz2
libdbusmenu-d9615c247888582ce6bfd54e4df9123d22226f4b.zip
Keep refs to the client and makes sure to disconnect all
handlers. (LP: #749609)
-rw-r--r--debian/changelog4
-rw-r--r--libdbusmenu-glib/client.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 72869e6..533b3df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ libdbusmenu (0.4.1-0ubuntu2~ppa1) UNRELEASED; urgency=low
* Upstream Merge
* Fix GIR scan to not include duplicate namespaces (LP: #750575)
+ * Keep refs to the client and makes sure to disconnect all
+ handlers. (LP: #749609)
- -- Ted Gould <ted@ubuntu.com> Tue, 05 Apr 2011 16:16:09 -0500
+ -- Ted Gould <ted@ubuntu.com> Tue, 05 Apr 2011 16:18:25 -0500
libdbusmenu (0.4.1-0ubuntu1) natty; urgency=low
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index ef89705..1378e21 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -441,6 +441,9 @@ dbusmenu_client_dispose (GObject *object)
priv->menuproxy_cancel = NULL;
}
if (priv->menuproxy != NULL) {
+ g_signal_handlers_disconnect_matched(priv->menuproxy,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, object);
g_object_unref(G_OBJECT(priv->menuproxy));
priv->menuproxy = NULL;
}
@@ -1494,6 +1497,7 @@ menuitem_call_cb (GObject * proxy, GAsyncResult * res, gpointer userdata)
g_variant_unref(edata->variant);
g_free(edata->event);
g_object_unref(edata->menuitem);
+ g_object_unref(edata->client);
g_free(edata);
if (G_UNLIKELY(error != NULL)) {
@@ -1528,6 +1532,7 @@ dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name
event_data_t * edata = g_new0(event_data_t, 1);
edata->client = client;
+ g_object_ref(client);
edata->menuitem = mi;
g_object_ref(edata->menuitem);
edata->event = g_strdup(name);