From: Ingo Ruhnke Date: Wed, 27 Aug 2014 08:24:55 +0000 (+0200) Subject: Only refresh menu items that have been created in the JoystickMenu to avoid crash X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2ac55fe1293cf5c6b9927c926826da259cf640ea;p=supertux.git Only refresh menu items that have been created in the JoystickMenu to avoid crash --- diff --git a/src/supertux/menu/joystick_menu.cpp b/src/supertux/menu/joystick_menu.cpp index c60bd7142..5e47bba90 100644 --- a/src/supertux/menu/joystick_menu.cpp +++ b/src/supertux/menu/joystick_menu.cpp @@ -224,7 +224,13 @@ JoystickMenu::refresh() refresh_menu_item(Controller::PEEK_RIGHT); refresh_menu_item(Controller::PEEK_UP); refresh_menu_item(Controller::PEEK_DOWN); - refresh_menu_item(Controller::CHEAT_MENU); + + if (g_config->developer_mode || g_config->console_enabled) { + refresh_menu_item(Controller::CONSOLE); + } + if (g_config->developer_mode) { + refresh_menu_item(Controller::CHEAT_MENU); + } } }