Fixing a failing when there are no menu items
authorTobias Markus <tobbi@mozilla-uk.org>
Tue, 12 Aug 2014 22:24:19 +0000 (00:24 +0200)
committerTobias Markus <tobbi@mozilla-uk.org>
Tue, 12 Aug 2014 22:24:19 +0000 (00:24 +0200)
src/gui/menu.cpp

index d26a782..59ad7f5 100644 (file)
@@ -369,6 +369,9 @@ Menu::process_input()
   }
   menuaction = MENU_ACTION_NONE;
 
+  if( int(items.size() ) == 0)
+    return;
+
   assert(active_item < int(items.size()));
 }