mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Fix crash due to not calling WindowModal::onClose()
This commit is contained in:
parent
ca3b08b852
commit
94b538ac82
@ -187,6 +187,8 @@ namespace MWGui
|
||||
|
||||
void RaceDialog::onClose()
|
||||
{
|
||||
WindowModal::onClose();
|
||||
|
||||
mPreviewImage->setRenderItemTexture(NULL);
|
||||
|
||||
mPreviewTexture.reset(NULL);
|
||||
|
@ -1738,9 +1738,12 @@ namespace MWGui
|
||||
// Only remove the top if it matches the current pointer. A lot of things hide their visibility before showing it,
|
||||
//so just popping the top would cause massive issues.
|
||||
if(!mCurrentModals.empty())
|
||||
{
|
||||
if(input == mCurrentModals.top())
|
||||
mCurrentModals.pop();
|
||||
|
||||
else
|
||||
std::cout << " warning: modal widget " << input << " " << typeid(input).name() << " not found " << std::endl;
|
||||
}
|
||||
if (mCurrentModals.empty())
|
||||
mKeyboardNavigation->restoreFocus(getMode());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user