mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-01 11:04:31 +00:00
Fix some dangling window pointer use on exit
This commit is contained in:
parent
b5f87a9d50
commit
2bb1c4810d
1 changed files with 6 additions and 0 deletions
|
|
@ -891,6 +891,9 @@ namespace MWGui
|
||||||
if (!mCurrentModals.empty())
|
if (!mCurrentModals.empty())
|
||||||
return mCurrentModals.back();
|
return mCurrentModals.back();
|
||||||
|
|
||||||
|
if (mWindows.empty())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
if (isSettingsWindowVisible())
|
if (isSettingsWindowVisible())
|
||||||
return mSettingsWindow;
|
return mSettingsWindow;
|
||||||
|
|
||||||
|
|
@ -2650,6 +2653,9 @@ namespace MWGui
|
||||||
if (!Settings::gui().mControllerMenus || !mControllerButtonsOverlay)
|
if (!Settings::gui().mControllerMenus || !mControllerButtonsOverlay)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (mWindows.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
WindowBase* topWin = getActiveControllerWindow();
|
WindowBase* topWin = getActiveControllerWindow();
|
||||||
if (!topWin || !topWin->isVisible())
|
if (!topWin || !topWin->isVisible())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue