From 29c79abc2275fa3b8475ad20d7a448fa9f026460 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 22 Dec 2019 11:13:18 +0800 Subject: [PATCH] Fix possible exit crash --- src/guiengine/screen_keyboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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