From: Ingo Ruhnke Date: Fri, 15 Aug 2014 08:07:26 +0000 (+0200) Subject: Clear menu stack on MenuManager::set_menu() to avoid accidentally stacking menus X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d31021676c58d9dc1de19cfa58022a60161ab2e3;p=supertux.git Clear menu stack on MenuManager::set_menu() to avoid accidentally stacking menus --- diff --git a/src/gui/menu_manager.cpp b/src/gui/menu_manager.cpp index d30f06501..3f9ff8e17 100644 --- a/src/gui/menu_manager.cpp +++ b/src/gui/menu_manager.cpp @@ -261,6 +261,7 @@ MenuManager::set_menu(std::unique_ptr menu) { transition(m_menu_stack.empty() ? nullptr : m_menu_stack.back().get(), menu.get()); + m_menu_stack.clear(); m_menu_stack.push_back(std::move(menu)); } else