From 6255b0492b7397f4075eac4fc3aee0feda0d29c1 Mon Sep 17 00:00:00 2001 From: "glassmancody.info" Date: Sat, 13 Mar 2021 15:43:46 -0800 Subject: [PATCH] Resolve crashes on exit with visible MyGUI widgets --- CHANGELOG.md | 1 + apps/openmw/mwgui/layout.cpp | 1 + apps/openmw/mwgui/windowmanagerimp.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3563007cb1..face13d193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,6 +108,7 @@ Bug #5869: Guards can initiate arrest dialogue behind locked doors Bug #5871: The console appears if you type the Russian letter "Ё" in the name of the enchantment Bug #5877: Effects appearing with empty icon + Bug #5899: Visible modal windows and dropdowns crashing game on exit Feature #390: 3rd person look "over the shoulder" Feature #832: OpenMW-CS: Handle deleted references Feature #1536: Show more information about level on menu diff --git a/apps/openmw/mwgui/layout.cpp b/apps/openmw/mwgui/layout.cpp index ae1c096599..9b9b9537f9 100644 --- a/apps/openmw/mwgui/layout.cpp +++ b/apps/openmw/mwgui/layout.cpp @@ -35,6 +35,7 @@ namespace MWGui void Layout::shutdown() { + setVisible(false); MyGUI::Gui::getInstance().destroyWidget(mMainWidget); mListWindowRoot.clear(); } diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index e82ba8c1d6..62b3d32d04 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -503,8 +503,6 @@ namespace MWGui { mStatsWatcher.reset(); - mKeyboardNavigation.reset(); - MyGUI::LanguageManager::getInstance().eventRequestTag.clear(); MyGUI::PointerManager::getInstance().eventChangeMousePointer.clear(); MyGUI::InputManager::getInstance().eventChangeKeyFocus.clear(); @@ -523,6 +521,8 @@ namespace MWGui delete mCursorManager; delete mToolTips; + mKeyboardNavigation.reset(); + cleanupGarbage(); mFontLoader.reset();