- fixed potential crash
authorRyan Flegel <rflegel@gmail.com>
Thu, 13 May 2004 02:40:10 +0000 (02:40 +0000)
committerRyan Flegel <rflegel@gmail.com>
Thu, 13 May 2004 02:40:10 +0000 (02:40 +0000)
SVN-Revision: 1150

src/menu.cpp

index baa7032..5b567c5 100644 (file)
@@ -480,6 +480,9 @@ Menu::action()
   }
 
   menuaction = MENU_ACTION_NONE;
+
+  if (active_item >= item.size()) 
+    active_item = int(item.size()) - 1;
 }
 
 int