diff --git a/components/detournavigator/navmeshtilescache.cpp b/components/detournavigator/navmeshtilescache.cpp index 8dc554d79..ccc41a666 100644 --- a/components/detournavigator/navmeshtilescache.cpp +++ b/components/detournavigator/navmeshtilescache.cpp @@ -74,10 +74,9 @@ namespace DetourNavigator } iterator->mNavMeshData = std::move(value); + ++iterator->mUseCount; mUsedNavMeshDataSize += itemSize; - mFreeNavMeshDataSize += itemSize; - - acquireItemUnsafe(iterator); + mBusyItems.splice(mBusyItems.end(), mFreeItems, iterator); return Value(*this, iterator); }