summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-12-11 21:05:35 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-12-11 21:05:35 +0000
commitb9258cf159815051e3b45df96e22898518b9307d (patch)
treee902bad839bb3138d18aa2f09794cd8e7108ddbb
parent7d820556e95ce8837eaa5baf2f6b5215a4b129ce (diff)
downloadrockbox-b9258cf159815051e3b45df96e22898518b9307d.zip
rockbox-b9258cf159815051e3b45df96e22898518b9307d.tar.gz
rockbox-b9258cf159815051e3b45df96e22898518b9307d.tar.bz2
rockbox-b9258cf159815051e3b45df96e22898518b9307d.tar.xz
Prevent recursion of the main menu, fixes FS#6010
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11720 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main_menu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index f66f511..4af2f1a 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -380,10 +380,15 @@ bool main_menu(void)
int m;
bool result;
int i = 0;
+ static bool inside_menu = false;
+
/* main menu */
struct menu_item items[11];
+ if(inside_menu) return false;
+ inside_menu = true;
+
items[i].desc = ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS);
items[i++].function = bookmark_mrb_load;
@@ -435,6 +440,8 @@ bool main_menu(void)
#endif
menu_exit(m);
+ inside_menu = false;
+
return result;
}