From 71d97988258b4e39b775c4733b03eb93185ec327 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Wed, 13 Aug 2014 00:36:04 +0200 Subject: [PATCH] Better fix for crash when selecting back --- src/gui/menu.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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())); } -- 2.11.0