Fix possible exit crash

This commit is contained in:
Benau 2019-12-22 11:13:18 +08:00
parent 01c57fa483
commit 29c79abc22

View File

@ -138,7 +138,8 @@ ScreenKeyboard::~ScreenKeyboard()
GUIEngine::getGUIEnv()->removeFocus(m_irrlicht_window);
m_irrlicht_window->remove();
input_manager->setMode(m_previous_mode);
if (input_manager)
input_manager->setMode(m_previous_mode);
elementsWereDeleted();
} // ~ScreenKeyboard