diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-12-11 21:05:35 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-12-11 21:05:35 +0000 |
commit | b9258cf159815051e3b45df96e22898518b9307d (patch) | |
tree | e902bad839bb3138d18aa2f09794cd8e7108ddbb | |
parent | 7d820556e95ce8837eaa5baf2f6b5215a4b129ce (diff) | |
download | rockbox-b9258cf159815051e3b45df96e22898518b9307d.tar.gz rockbox-b9258cf159815051e3b45df96e22898518b9307d.zip |
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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index f66f511e9c..4af2f1a4f3 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -380,10 +380,15 @@ bool main_menu(void) | |||
380 | int m; | 380 | int m; |
381 | bool result; | 381 | bool result; |
382 | int i = 0; | 382 | int i = 0; |
383 | static bool inside_menu = false; | ||
384 | |||
383 | 385 | ||
384 | /* main menu */ | 386 | /* main menu */ |
385 | struct menu_item items[11]; | 387 | struct menu_item items[11]; |
386 | 388 | ||
389 | if(inside_menu) return false; | ||
390 | inside_menu = true; | ||
391 | |||
387 | items[i].desc = ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS); | 392 | items[i].desc = ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS); |
388 | items[i++].function = bookmark_mrb_load; | 393 | items[i++].function = bookmark_mrb_load; |
389 | 394 | ||
@@ -435,6 +440,8 @@ bool main_menu(void) | |||
435 | #endif | 440 | #endif |
436 | menu_exit(m); | 441 | menu_exit(m); |
437 | 442 | ||
443 | inside_menu = false; | ||
444 | |||
438 | return result; | 445 | return result; |
439 | } | 446 | } |
440 | 447 | ||