diff options
author | Ted Gould <ted@canonical.com> | 2009-08-27 08:49:11 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-08-27 08:49:11 -0500 |
commit | 9e5b9b3ce66ff01c8395ea28bc227bb34cb50f8e (patch) | |
tree | eb3c3c8d427f1d8d804046290c58d7f79d410566 /libdbusmenu-gtk | |
parent | 86b7b92f7f45eb77ce648a9fae5d48c3d0e02632 (diff) | |
download | libdbusmenu-9e5b9b3ce66ff01c8395ea28bc227bb34cb50f8e.tar.gz libdbusmenu-9e5b9b3ce66ff01c8395ea28bc227bb34cb50f8e.tar.bz2 libdbusmenu-9e5b9b3ce66ff01c8395ea28bc227bb34cb50f8e.zip |
Checking the menu is a GTK menu before casting it. Comments by Neil.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/menu.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |