Fix GetNodesPose issue when 2 threads call it at once

This commit is contained in:
Wojtek Figat
2026-02-09 18:06:57 +01:00
parent a1399c5157
commit d2ee61ef8d

View File

@@ -212,7 +212,6 @@ const Array<Matrix>& SkeletonData::GetNodesPose() const
ScopeLock lock(RenderContext::GPULocker);
if (Platform::AtomicRead(&_dirty))
{
Platform::AtomicStore(&_dirty, 0);
const SkeletonNode* nodes = Nodes.Get();
const int32 nodesCount = Nodes.Count();
_cachedPose.Resize(nodesCount);
@@ -227,6 +226,7 @@ const Array<Matrix>& SkeletonData::GetNodesPose() const
else
posePtr[nodeIndex] = local;
}
Platform::AtomicStore(&_dirty, 0);
}
}
return _cachedPose;