From d95512bccea85e9fe0132cedda401249a679538f Mon Sep 17 00:00:00 2001 From: Blue_Dude Date: Thu, 8 Apr 2010 14:34:14 +0000 Subject: [PATCH] Fix data abort due to malformed switch code. My bad. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25537 a1c6a512-1295-4272-9138-f99709370657 --- apps/onplay.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/onplay.c b/apps/onplay.c index d177fac2c..61bfe6695 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1368,6 +1368,7 @@ int onplay(char* file, int attr, int from, bool hotkey) context = from; selected_file = file; selected_file_attr = attr; + int menu_selection; #ifdef HAVE_HOTKEY if (hotkey) return execute_hotkey(context == CONTEXT_WPS); @@ -1379,13 +1380,17 @@ int onplay(char* file, int attr, int from, bool hotkey) menu = &wps_onplay_menu; else menu = &tree_onplay_menu; - switch (do_menu(menu, NULL, NULL, false)) - { + menu_selection = do_menu(menu, NULL, NULL, false); #ifdef HAVE_HOTKEY - hotkey_settable_menu = false; + hotkey_settable_menu = false; + switch (menu_selection) + { case MENU_SELECTED_HOTKEY: set_hotkey(context == CONTEXT_WPS); return ONPLAY_RELOAD_DIR; +#else + switch (menu_selection) + { #endif case GO_TO_WPS: return ONPLAY_START_PLAY; -- 2.11.4.GIT