mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix editor crash in prune tool
Always reset flags buffer as polygon references will no longer align with flags buffer on rebuild.
This commit is contained in:
parent
b91fd983f9
commit
79afdf08fe
@ -222,20 +222,26 @@ NavMeshPruneTool::NavMeshPruneTool() :
|
|||||||
|
|
||||||
NavMeshPruneTool::~NavMeshPruneTool()
|
NavMeshPruneTool::~NavMeshPruneTool()
|
||||||
{
|
{
|
||||||
delete m_flags;
|
if (m_flags)
|
||||||
|
delete m_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavMeshPruneTool::init(Editor* editor)
|
void NavMeshPruneTool::init(Editor* editor)
|
||||||
{
|
{
|
||||||
m_editor = editor;
|
m_editor = editor;
|
||||||
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavMeshPruneTool::reset()
|
void NavMeshPruneTool::reset()
|
||||||
{
|
{
|
||||||
m_hitPosSet = false;
|
m_hitPosSet = false;
|
||||||
m_ranPruneTool = false;
|
m_ranPruneTool = false;
|
||||||
delete m_flags;
|
|
||||||
m_flags = 0;
|
if (m_flags)
|
||||||
|
{
|
||||||
|
delete m_flags;
|
||||||
|
m_flags = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavMeshPruneTool::handleMenu()
|
void NavMeshPruneTool::handleMenu()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user