aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/menuitem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
index 9ccef96..2cf4b85 100644
--- a/libdbusmenu-glib/menuitem.c
+++ b/libdbusmenu-glib/menuitem.c
@@ -195,6 +195,8 @@ DbusmenuMenuitem *
dbusmenu_menuitem_child_find (DbusmenuMenuitem * mi, guint id)
{
GList * childs = dbusmenu_menuitem_get_children(mi);
+ if (childs == NULL) return NULL;
+
for ( ; childs == NULL; childs = g_list_next(childs)) {
DbusmenuMenuitem * lmi = DBUSMENU_MENUITEM(childs->data);
if (id == dbusmenu_menuitem_get_id(lmi)) {