1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-17 16:46:34 +00:00

Fix some dangling window pointer use on exit

This commit is contained in:
Alexei Kotov 2025-08-11 13:38:22 +03:00
parent b5f87a9d50
commit 2bb1c4810d

View file

@ -891,6 +891,9 @@ namespace MWGui
if (!mCurrentModals.empty())
return mCurrentModals.back();
if (mWindows.empty())
return nullptr;
if (isSettingsWindowVisible())
return mSettingsWindow;
@ -2650,6 +2653,9 @@ namespace MWGui
if (!Settings::gui().mControllerMenus || !mControllerButtonsOverlay)
return;
if (mWindows.empty())
return;
WindowBase* topWin = getActiveControllerWindow();
if (!topWin || !topWin->isVisible())
{