From: Tobias Markus Date: Tue, 12 Aug 2014 22:36:04 +0000 (+0200) Subject: Better fix for crash when selecting back X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=71d97988258b4e39b775c4733b03eb93185ec327;p=supertux.git Better fix for crash when selecting back --- diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index 59ad7f56f..d6dff2464 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -326,7 +326,7 @@ Menu::process_input() case MN_BACK: MenuManager::instance().pop_menu(); - break; + return; default: break; @@ -362,16 +362,13 @@ Menu::process_input() case MENU_ACTION_BACK: MenuManager::instance().pop_menu(); - break; + return; case MENU_ACTION_NONE: break; } menuaction = MENU_ACTION_NONE; - if( int(items.size() ) == 0) - return; - assert(active_item < int(items.size())); }