aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-27 11:02:24 -0500
committerTed Gould <ted@gould.cx>2011-09-27 11:02:24 -0500
commit201093de1febf37f60d27dea220fe24ed4cd05b0 (patch)
tree523baa1e502b8827aed68d38918c43065803d315 /libdbusmenu-glib
parentae5cc66dfcc419e28178b6061fcd2ef0a9209d87 (diff)
parentc7bbea8c9cda22ee2f4af0cc82f777217c0a4ad8 (diff)
downloadlibdbusmenu-201093de1febf37f60d27dea220fe24ed4cd05b0.tar.gz
libdbusmenu-201093de1febf37f60d27dea220fe24ed4cd05b0.tar.bz2
libdbusmenu-201093de1febf37f60d27dea220fe24ed4cd05b0.zip
Protect client_about_to_show() from abusers
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 588c940..1ee8641 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1604,7 +1604,11 @@ about_to_show_cb (GObject * proxy, GAsyncResult * res, gpointer userdata)
void
dbusmenu_client_send_about_to_show(DbusmenuClient * client, gint id, void (*cb)(gpointer data), gpointer cb_data)
{
+ g_return_if_fail(DBUSMENU_CLIENT(client));
+ g_return_if_fail(id > 0);
+
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
+ g_return_if_fail(priv != NULL);
about_to_show_t * data = g_new0(about_to_show_t, 1);
data->client = client;