diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index cf4679287..8c397b9f1 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -352,6 +352,9 @@ namespace MWGui WindowManager::~WindowManager() { + MyGUI::PointerManager::getInstance().eventChangeMousePointer.clear(); + MyGUI::InputManager::getInstance().eventChangeKeyFocus.clear(); + delete mConsole; delete mMessageBoxManager; delete mHud; @@ -385,7 +388,6 @@ namespace MWGui delete mMerchantRepair; delete mRepair; delete mSoulgemDialog; - delete mCursorManager; delete mRecharge; delete mCompanionWindow; delete mHitFader; @@ -394,6 +396,8 @@ namespace MWGui delete mBlindnessFader; delete mDebugWindow; + delete mCursorManager; + cleanupGarbage(); delete mGuiManager;