mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 17:36:40 +00:00
Add an assert to detect possible nullptr dereference
This commit is contained in:
parent
5d94a94a98
commit
124db67496
1 changed files with 2 additions and 0 deletions
|
@ -511,6 +511,8 @@ namespace DetourNavigator
|
|||
const auto offMeshConnections = mOffMeshConnectionsManager.get().get(job.mChangedTile);
|
||||
|
||||
const PreparedNavMeshData* preparedNavMeshDataPtr = cachedNavMeshData ? &cachedNavMeshData.get() : preparedNavMeshData.get();
|
||||
assert (preparedNavMeshDataPtr != nullptr);
|
||||
|
||||
const UpdateNavMeshStatus status = navMeshCacheItem.lock()->updateTile(job.mChangedTile, std::move(cachedNavMeshData),
|
||||
makeNavMeshTileData(*preparedNavMeshDataPtr, offMeshConnections, job.mAgentBounds, job.mChangedTile, mSettings.get().mRecast));
|
||||
|
||||
|
|
Loading…
Reference in a new issue