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:
Kawe Mazidjatari 2024-10-04 16:04:55 +02:00
parent b91fd983f9
commit 79afdf08fe

View File

@ -222,20 +222,26 @@ NavMeshPruneTool::NavMeshPruneTool() :
NavMeshPruneTool::~NavMeshPruneTool()
{
delete m_flags;
if (m_flags)
delete m_flags;
}
void NavMeshPruneTool::init(Editor* editor)
{
m_editor = editor;
reset();
}
void NavMeshPruneTool::reset()
{
m_hitPosSet = false;
m_ranPruneTool = false;
delete m_flags;
m_flags = 0;
if (m_flags)
{
delete m_flags;
m_flags = 0;
}
}
void NavMeshPruneTool::handleMenu()