diff --git a/src/guiengine/screen_keyboard.cpp b/src/guiengine/screen_keyboard.cpp index 596ad7d6b..4ee8ce49d 100644 --- a/src/guiengine/screen_keyboard.cpp +++ b/src/guiengine/screen_keyboard.cpp @@ -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