mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix crash caused by null navmesh
Make sure there is a navmesh before attempting to build static pathing data. The crash gets triggered when loading geometry, and trying to build a tile without generating the navmesh first.
This commit is contained in:
parent
400a71ae05
commit
13db18f700
@ -344,6 +344,8 @@ void Editor::handleUpdate(const float dt)
|
||||
|
||||
void Editor::buildStaticPathingData()
|
||||
{
|
||||
if (!m_navMesh) return;
|
||||
|
||||
dtDisjointSet data;
|
||||
|
||||
if (!dtCreateDisjointPolyGroups(m_navMesh, data))
|
||||
|
Loading…
x
Reference in New Issue
Block a user