diff --git a/components/detournavigator/navmeshtilescache.cpp b/components/detournavigator/navmeshtilescache.cpp index 8bbe8ed483..cd60fa7e8b 100644 --- a/components/detournavigator/navmeshtilescache.cpp +++ b/components/detournavigator/navmeshtilescache.cpp @@ -132,6 +132,7 @@ namespace DetourNavigator return; mUsedNavMeshDataSize -= static_cast(item.mNavMeshData.mSize) + item.mNavMeshKey.size(); + mFreeNavMeshDataSize -= static_cast(item.mNavMeshData.mSize) + item.mNavMeshKey.size(); mFreeItems.pop_back(); tileValues->second.Map.erase(value);