mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 13:20:35 +00:00
Handle failed NavMesh allocation
This commit is contained in:
parent
a6260453ea
commit
0985d8e03d
@ -495,6 +495,10 @@ namespace DetourNavigator
|
||||
params.maxPolys = 1 << polysBits;
|
||||
|
||||
NavMeshPtr navMesh(dtAllocNavMesh(), &dtFreeNavMesh);
|
||||
|
||||
if (navMesh == nullptr)
|
||||
throw NavigatorException("Failed to allocate navmesh");
|
||||
|
||||
const auto status = navMesh->init(¶ms);
|
||||
|
||||
if (!dtStatusSucceed(status))
|
||||
|
Loading…
x
Reference in New Issue
Block a user