|
From: Tapio V. <aa...@us...> - 2010-08-21 18:03:14
|
Module: performous
Branch: master
Commit: a839bba5a254c7fe8f717bd1bd86716dbb12da0e
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jul 8 18:45:24 2010 +0300
Don't enter into an empty submenu.
---
game/menu.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/menu.cc b/game/menu.cc
index d01b578..3fab361 100644
--- a/game/menu.cc
+++ b/game/menu.cc
@@ -65,6 +65,7 @@ void Menu::move(int dir) {
void Menu::action(int dir) {
switch (current_it->type) {
case MenuOption::OPEN_SUBMENU:
+ if (current_it->options.empty()) break;
options = current_it->options;
current_it = options.begin();
m_level++;
|