Fix assertion when going back fron network to normal kart selection screen

This commit is contained in:
Benau 2018-03-22 13:26:44 +08:00
parent c026261e0f
commit ebadc84945
2 changed files with 6 additions and 2 deletions

View File

@ -321,8 +321,6 @@ void KartSelectionScreen::init()
Widget* placeholder = getWidget("playerskarts");
assert(placeholder != NULL);
// FIXME : The reserved id value is -1 when we switch from KSS to NKSS and vice-versa
m_dispatcher->setRootID(placeholder->m_reserved_id);
g_root_id = placeholder->m_reserved_id;

View File

@ -54,6 +54,12 @@ public:
// ------------------------------------------------------------------------
virtual bool playerQuit(StateManager::ActivePlayer* player) OVERRIDE
{ return true; }
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void tearDown() OVERRIDE
{
m_must_delete_on_back = true;
KartSelectionScreen::tearDown();
}
};