aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-09 16:20:06 -0600
committerTed Gould <ted@gould.cx>2012-02-09 16:20:06 -0600
commit29a58948a274ca3cff7da3b32ad97d47cef012c8 (patch)
treee65ff449a3f521f2d55a656e3ddc2764a98988eb /libdbusmenu-glib
parent8d7a4ec5cbf30119b0ec553174853556a480228a (diff)
downloadlibdbusmenu-29a58948a274ca3cff7da3b32ad97d47cef012c8.tar.gz
libdbusmenu-29a58948a274ca3cff7da3b32ad97d47cef012c8.tar.bz2
libdbusmenu-29a58948a274ca3cff7da3b32ad97d47cef012c8.zip
Ensure that we only return the invocation one way
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/server.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 4890d37..a9ff311 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -1595,7 +1595,6 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i
DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id);
if (mi == NULL) {
-
g_dbus_method_invocation_return_error(invocation,
error_quark(),
INVALID_MENUITEM_ID,
@@ -1605,17 +1604,17 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i
g_variant_unref(data);
} else {
-
idle_event_t * event_data = g_new0(idle_event_t, 1);
event_data->mi = g_object_ref(mi);
- event_data->eventid = etype;
+ event_data->eventid = etype; /* give away our allocation */
event_data->timestamp = ts;
event_data->variant = data; /* give away our reference */
g_timeout_add(0, event_local_handler, event_data);
+
+ g_dbus_method_invocation_return_value(invocation, NULL);
}
- g_dbus_method_invocation_return_value(invocation, NULL);
return;
}