Fix crash on invalid Multi Blend 1D indices

#4176
This commit is contained in:
2026-10-01 09:43:51 +02:00
parent 3b0c501bde
commit 9f4bce7ea3
@@ -1427,11 +1427,12 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
{
const auto aIndex = data.IndicesSorted[i];
const auto bIndex = data.IndicesSorted[i + 1];
ASSERT_LOW_LAYER(aIndex != ANIM_GRAPH_MULTI_BLEND_INVALID);
const auto aData = node->Values[4 + aIndex * 2].AsFloat4();
AnimSampleData a(node->Assets[aIndex].As<Animation>(), aData.W, aIndex);
// Check single A case
if (x <= aData.X + ANIM_GRAPH_BLEND_THRESHOLD)
if (x <= aData.X + ANIM_GRAPH_BLEND_THRESHOLD || bIndex == ANIM_GRAPH_MULTI_BLEND_INVALID)
{
MultiBlendAnimData::BeforeSample(context, bucket, prevList, a, speed);
value = SampleAnimation(node, loop, startTimePos, a);