mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 20:06:43 +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);
|
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.empty())
|
||||||
{
|
|
||||||
if (mCurrentModals.back()->mMainWidget != 0)
|
|
||||||
mCurrentModals.back()->onFrame(frameDuration);
|
mCurrentModals.back()->onFrame(frameDuration);
|
||||||
else
|
|
||||||
mCurrentModals.pop_back();
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
End of tes3mp change (major)
|
|
||||||
*/
|
|
||||||
|
|
||||||
mKeyboardNavigation->onFrame();
|
mKeyboardNavigation->onFrame();
|
||||||
|
|
||||||
|
|
|
@ -100,8 +100,13 @@ void mwmp::GUIController::setChatVisible(bool chatVisible)
|
||||||
void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox &guiMessageBox)
|
void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox &guiMessageBox)
|
||||||
{
|
{
|
||||||
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
|
||||||
|
|
||||||
|
if (mListBox != NULL)
|
||||||
|
{
|
||||||
windowManager->removeDialog(mListBox);
|
windowManager->removeDialog(mListBox);
|
||||||
mListBox = nullptr;
|
windowManager->removeCurrentModal(mListBox);
|
||||||
|
mListBox = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> list;
|
std::vector<std::string> list;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue