From: Ryan Flegel Date: Thu, 13 May 2004 02:40:10 +0000 (+0000) Subject: - fixed potential crash X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b5ac22b799c4d029e851d5aff0876f86670144aa;p=supertux.git - fixed potential crash SVN-Revision: 1150 --- diff --git a/src/menu.cpp b/src/menu.cpp index baa703252..5b567c555 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -480,6 +480,9 @@ Menu::action() } menuaction = MENU_ACTION_NONE; + + if (active_item >= item.size()) + active_item = int(item.size()) - 1; } int