From 86cab293762c8b864a58f3e297c057cc05794daf Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Aug 2009 09:31:43 -0500 Subject: Checking args from libdbusmenu, stealing code from there. Comments by Neil. --- src/indicator-messages.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 0a1002d..c410ef7 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -140,6 +140,10 @@ setup_icon_proxy (gpointer userdata) static gboolean new_launcher_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client) { + g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE); + g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE); + /* Note: not checking parent, it's reasonable for it to be NULL */ + GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_menu_item_new()); GtkWidget * vbox = gtk_vbox_new(TRUE, 2); -- cgit v1.2.3