mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 08:56:10 -04:00
Merge branch 'settingscrash' into 'master'
Fix some dangling window pointer use on exit See merge request OpenMW/openmw!4846
This commit is contained in:
commit
32e463945e
@ -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())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user