summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/menu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 2837974c9d..bdf255cc39 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -434,7 +434,7 @@ void menu_delete(int menu, int position)
434 menus[menu].itemcount--; 434 menus[menu].itemcount--;
435 435
436 /* adjust if this was the last menu item and the cursor was on it */ 436 /* adjust if this was the last menu item and the cursor was on it */
437 if( menus[menu].itemcount <= menus[menu].cursor) 437 if(menus[menu].itemcount && menus[menu].itemcount <= menus[menu].cursor)
438 menus[menu].cursor = menus[menu].itemcount - 1; 438 menus[menu].cursor = menus[menu].itemcount - 1;
439} 439}
440 440