diff --git a/cmd/xfe/XfeWidgets/Xfe/MenuUtil.c b/cmd/xfe/XfeWidgets/Xfe/MenuUtil.c index 82f25fd3b7f1..c5ccbea94518 100644 --- a/cmd/xfe/XfeWidgets/Xfe/MenuUtil.c +++ b/cmd/xfe/XfeWidgets/Xfe/MenuUtil.c @@ -763,7 +763,7 @@ XfeDestroyMenuWidgetTree(WidgetList children, { int i; - if (num_children <= 0) + if ((num_children <= 0) || (children == NULL)) { return; }