aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-23 15:32:58 -0500
committerTed Gould <ted@gould.cx>2011-09-23 15:32:58 -0500
commit1c9f6b8933989d1fa23147cffc83d9976b08e831 (patch)
treedff8ed4f1273cdaecd0c73ab68361c7880327089 /libdbusmenu-glib
parente7acae9db34e6abea6b7aa1fe532ad18e13577c7 (diff)
downloadlibdbusmenu-1c9f6b8933989d1fa23147cffc83d9976b08e831.tar.gz
libdbusmenu-1c9f6b8933989d1fa23147cffc83d9976b08e831.tar.bz2
libdbusmenu-1c9f6b8933989d1fa23147cffc83d9976b08e831.zip
Protect an external function better
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 24d5c5d..a98ae98 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1578,7 +1578,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;