summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-10-03 00:43:09 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-10-03 00:43:09 +0000
commit28f1f50ab76f38d646d62e3248311813133e11a6 (patch)
tree4f59d95c5a98e91d382804152c8de6061a88d8b9 /apps
parentfcdffd68afdc0718910702fa1bb71b5ffc7a6d1c (diff)
downloadrockbox-28f1f50ab76f38d646d62e3248311813133e11a6.tar.gz
rockbox-28f1f50ab76f38d646d62e3248311813133e11a6.tar.bz2
rockbox-28f1f50ab76f38d646d62e3248311813133e11a6.zip
Hopefully fix crashes if the start screen is set to previous and nvram.bin becomes invalid
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18686 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/root_menu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 4b9be39a8c..d94f28d756 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -500,6 +500,9 @@ void root_menu(void)
int next_screen = GO_TO_ROOT;
int selected = 0;
+ if ((global_status.last_screen&0xff) == -1)
+ global_status.last_screen = GO_TO_ROOT;
+
if (global_settings.start_in_screen == 0)
next_screen = (int)global_status.last_screen;
else next_screen = global_settings.start_in_screen - 2;