summaryrefslogtreecommitdiffstats
path: root/commands/menu.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-08-21 18:49:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-08-30 20:57:20 +0200
commitf50d2063cbcd4a5ebd474445f9d9395918d342a1 (patch)
tree0e98189adca049bd2ba9764cfb059599c6fd848c /commands/menu.c
parent417e2d45fed238ed3f71e6c771bb84dbfc02c790 (diff)
downloadbarebox-f50d2063cbcd4a5ebd474445f9d9395918d342a1.tar.gz
menu: use an initialized struct list as menu list
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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 5efaa61..b874ccb 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);