mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:36:42 +00:00
[Client] Fix crashes caused by current modals with invalid widgets
This commit is contained in:
parent
d3f23220de
commit
eb1641dd86
1 changed files with 20 additions and 0 deletions
|
@ -860,6 +860,26 @@ namespace MWGui
|
||||||
window->onFrame(frameDuration);
|
window->onFrame(frameDuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Fix crashes caused by messageboxes that never have their modals erased elsewhere, working around
|
||||||
|
one of the main GUI-related problems that arise in an unpaused environment
|
||||||
|
*/
|
||||||
|
for (auto modalIterator = mCurrentModals.begin(); modalIterator != mCurrentModals.end();) {
|
||||||
|
if ((*modalIterator)->mMainWidget == 0)
|
||||||
|
{
|
||||||
|
mCurrentModals.erase(modalIterator);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++modalIterator;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
// Make sure message boxes are always in front
|
// Make sure message boxes are always in front
|
||||||
// This is an awful workaround for a series of awfully interwoven issues that couldn't be worked around
|
// This is an awful workaround for a series of awfully interwoven issues that couldn't be worked around
|
||||||
// in a better way because of an impressive number of even more awfully interwoven issues.
|
// in a better way because of an impressive number of even more awfully interwoven issues.
|
||||||
|
|
Loading…
Reference in a new issue