Better fix for crash when selecting back
authorTobias Markus <tobbi@mozilla-uk.org>
Tue, 12 Aug 2014 22:36:04 +0000 (00:36 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Tue, 12 Aug 2014 22:36:04 +0000 (00:36 +0200)
src/gui/menu.cpp

index 59ad7f5..d6dff24 100644 (file)
@@ -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()));
 }