mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-05-28 18:21:20 +00:00
Fixed crash occurring when closing the world editor
This commit is contained in:
parent
a7b381f301
commit
1f357b4250
@ -1,6 +1,7 @@
|
||||
#include "CEditorApplication.h"
|
||||
#include "IEditor.h"
|
||||
#include "CBasicViewport.h"
|
||||
#include "Editor/WorldEditor/CWorldEditor.h"
|
||||
#include <Common/AssertMacro.h>
|
||||
#include <Common/CTimer.h>
|
||||
|
||||
@ -47,6 +48,9 @@ void CEditorApplication::OnEditorClose()
|
||||
IEditor *pEditor = qobject_cast<IEditor*>(sender());
|
||||
ASSERT(pEditor);
|
||||
|
||||
mEditorWindows.removeOne(pEditor);
|
||||
delete pEditor;
|
||||
if (qobject_cast<CWorldEditor*>(pEditor) == nullptr)
|
||||
{
|
||||
mEditorWindows.removeOne(pEditor);
|
||||
delete pEditor;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user