summaryrefslogtreecommitdiffstats
path: root/commands/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/menu.c')
-rw-r--r--commands/menu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/menu.c b/commands/menu.c
index 5efaa614d2..b874ccb464 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -278,6 +278,9 @@ static int do_menu_list(struct cmd_menu *cm)
struct menu* m = NULL;
struct menu* menus = menu_get_menus();
+ if (!menus)
+ return 0;
+
if (is_entry(cm)) {
if (cm->menu)
m = menu_get_by_name(cm->menu);