diff options
author | Ted Gould <ted@gould.cx> | 2011-04-05 16:18:08 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-04-05 16:18:08 -0500 |
commit | 57f6e7f1f7e7ecc00b46f5cb97ddd8f771d048d2 (patch) | |
tree | 5504aa36d21a51534410a349a5dc02450cc2e607 | |
parent | cce935cb4b020a2634129f1fe5cd8175c6214fa8 (diff) | |
parent | f7bbf51c51defcd80c796ea40b512c51f2ba11d2 (diff) | |
download | libdbusmenu-57f6e7f1f7e7ecc00b46f5cb97ddd8f771d048d2.tar.gz libdbusmenu-57f6e7f1f7e7ecc00b46f5cb97ddd8f771d048d2.tar.bz2 libdbusmenu-57f6e7f1f7e7ecc00b46f5cb97ddd8f771d048d2.zip |
Keep refs to the client and makes sure to disconnect all handlers.
-rw-r--r-- | libdbusmenu-glib/client.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |