caught potential bug in abstract_state_manager
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5352 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
230b95b460
commit
77ecba5bc4
@ -118,8 +118,10 @@ void AbstractStateManager::replaceTopMostScreen(Screen* screen)
|
||||
if (!screen->isLoaded()) screen->loadFromFile();
|
||||
std::string name = screen->getName();
|
||||
|
||||
assert(m_menu_stack.size() > 0);
|
||||
|
||||
// Send tear-down event to previous menu
|
||||
if (m_menu_stack.size() > 0) getCurrentScreen()->tearDown();
|
||||
getCurrentScreen()->tearDown();
|
||||
|
||||
m_menu_stack[m_menu_stack.size()-1] = name;
|
||||
switchToScreen(name.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user