mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 17:49:41 +00:00
[Client] Fix ListBox overlap crashes by removing ListBoxes properly
This commit is contained in:
parent
c6a85ee8f9
commit
e3bc11d9eb
2 changed files with 8 additions and 18 deletions
|
@ -908,23 +908,8 @@ namespace MWGui
|
|||
window->onFrame(frameDuration);
|
||||
}
|
||||
|
||||
/*
|
||||
Start of tes3mp change (major)
|
||||
|
||||
Custom GUI elements added by TES3MP often cause a crash here when their
|
||||
mMainWidget becomes null, so a temporary fix has been added until a
|
||||
more appropriate solution is researched
|
||||
*/
|
||||
if (!mCurrentModals.empty())
|
||||
{
|
||||
if (mCurrentModals.back()->mMainWidget != 0)
|
||||
mCurrentModals.back()->onFrame(frameDuration);
|
||||
else
|
||||
mCurrentModals.pop_back();
|
||||
}
|
||||
/*
|
||||
End of tes3mp change (major)
|
||||
*/
|
||||
mCurrentModals.back()->onFrame(frameDuration);
|
||||
|
||||
mKeyboardNavigation->onFrame();
|
||||
|
||||
|
|
|
@ -100,8 +100,13 @@ void mwmp::GUIController::setChatVisible(bool chatVisible)
|
|||
void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox &guiMessageBox)
|
||||
{
|
||||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||
windowManager->removeDialog(mListBox);
|
||||
mListBox = nullptr;
|
||||
|
||||
if (mListBox != NULL)
|
||||
{
|
||||
windowManager->removeDialog(mListBox);
|
||||
windowManager->removeCurrentModal(mListBox);
|
||||
mListBox = NULL;
|
||||
}
|
||||
|
||||
std::vector<std::string> list;
|
||||
|
||||
|
|
Loading…
Reference in a new issue