aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-20 11:26:08 -0500
committerTed Gould <ted@gould.cx>2010-07-20 11:26:08 -0500
commitbb0a4f168ea59d6afdfbe9a5c9473ef1ee6f37ad (patch)
treed80a7086e7c9e606593069ca4f54f3d64a056034
parent90ebe32795a5af7f659da78ba96414c49c268b46 (diff)
downloadlibdbusmenu-bb0a4f168ea59d6afdfbe9a5c9473ef1ee6f37ad.tar.gz
libdbusmenu-bb0a4f168ea59d6afdfbe9a5c9473ef1ee6f37ad.tar.bz2
libdbusmenu-bb0a4f168ea59d6afdfbe9a5c9473ef1ee6f37ad.zip
Add a check to protect against adding the same ID twice to the queue.
-rw-r--r--libdbusmenu-glib/client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 1c962dd..e962f78 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -509,6 +509,14 @@ static void
get_properties_globber (DbusmenuClient * client, gint id, const gchar ** properties, org_ayatana_dbusmenu_get_properties_reply callback, gpointer user_data)
{
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
+ if (find_listener(priv->delayed_property_listeners, 0, id) != NULL) {
+ g_warning("Asking for properties from same ID twice: %d", id);
+ GError * localerror = NULL;
+ g_set_error_literal(&localerror, 0, 0, "ID already queued");
+ callback(priv->menuproxy, NULL, localerror, user_data);
+ g_error_free(localerror);
+ return;
+ }
if (properties == NULL || properties[0] == NULL) {
/* get all case */