mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
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
@ -36,8 +36,13 @@ namespace MWGui
|
||||
|
||||
void MessageBoxManager::clear()
|
||||
{
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
if (mInterMessageBoxe)
|
||||
{
|
||||
mInterMessageBoxe->setVisible(false);
|
||||
|
||||
delete mInterMessageBoxe;
|
||||
mInterMessageBoxe = NULL;
|
||||
}
|
||||
|
||||
std::vector<MessageBox*>::iterator it(mMessageBoxes.begin());
|
||||
for (; it != mMessageBoxes.end(); ++it)
|
||||
|
Loading…
x
Reference in New Issue
Block a user