mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-05-30 03:01:32 +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 "CEditorApplication.h"
|
||||||
#include "IEditor.h"
|
#include "IEditor.h"
|
||||||
#include "CBasicViewport.h"
|
#include "CBasicViewport.h"
|
||||||
|
#include "Editor/WorldEditor/CWorldEditor.h"
|
||||||
#include <Common/AssertMacro.h>
|
#include <Common/AssertMacro.h>
|
||||||
#include <Common/CTimer.h>
|
#include <Common/CTimer.h>
|
||||||
|
|
||||||
@ -47,6 +48,9 @@ void CEditorApplication::OnEditorClose()
|
|||||||
IEditor *pEditor = qobject_cast<IEditor*>(sender());
|
IEditor *pEditor = qobject_cast<IEditor*>(sender());
|
||||||
ASSERT(pEditor);
|
ASSERT(pEditor);
|
||||||
|
|
||||||
mEditorWindows.removeOne(pEditor);
|
if (qobject_cast<CWorldEditor*>(pEditor) == nullptr)
|
||||||
delete pEditor;
|
{
|
||||||
|
mEditorWindows.removeOne(pEditor);
|
||||||
|
delete pEditor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user