From: Tobias Markus Date: Tue, 12 Aug 2014 22:24:19 +0000 (+0200) Subject: Fixing a failing when there are no menu items X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1a8971c7e00d31f26264b8c2670d0675147b935c;p=supertux.git Fixing a failing when there are no menu items --- diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index d26a7827a..59ad7f56f 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -369,6 +369,9 @@ Menu::process_input() } menuaction = MENU_ACTION_NONE; + if( int(items.size() ) == 0) + return; + assert(active_item < int(items.size())); }