From 9e5b9b3ce66ff01c8395ea28bc227bb34cb50f8e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 27 Aug 2009 08:49:11 -0500 Subject: Checking the menu is a GTK menu before casting it. Comments by Neil. --- libdbusmenu-gtk/menu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libdbusmenu-gtk') diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c index 92cd13b..74e1bec 100644 --- a/libdbusmenu-gtk/menu.c +++ b/libdbusmenu-gtk/menu.c @@ -215,6 +215,8 @@ root_child_delete (DbusmenuMenuitem * root, DbusmenuMenuitem * child, DbusmenuGt static void child_realized (DbusmenuMenuitem * child, gpointer userdata) { + g_return_if_fail(DBUSMENU_IS_GTKMENU(userdata)); + DbusmenuGtkMenu * menu = DBUSMENU_GTKMENU(userdata); DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu); -- cgit v1.2.3