forked from teamnwah/openmw-tes3coop
Hide message box before deleting it
Fixes a crash when closing the game window during the 'plugin mismatch' dialog. Modal windows have to be hidden before they are deleted to prevent a dangling pointer in WindowManager.
This commit is contained in:
parent
d53e7f8a3c
commit
0ae009eb21
1 changed files with 7 additions and 2 deletions
|
@ -36,8 +36,13 @@ namespace MWGui
|
||||||
|
|
||||||
void MessageBoxManager::clear()
|
void MessageBoxManager::clear()
|
||||||
{
|
{
|
||||||
|
if (mInterMessageBoxe)
|
||||||
|
{
|
||||||
|
mInterMessageBoxe->setVisible(false);
|
||||||
|
|
||||||
delete mInterMessageBoxe;
|
delete mInterMessageBoxe;
|
||||||
mInterMessageBoxe = NULL;
|
mInterMessageBoxe = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||||
for (; it != mMessageBoxes.end(); ++it)
|
for (; it != mMessageBoxes.end(); ++it)
|
||||||
|
|
Loading…
Reference in a new issue