Fix for FAnimNode_RandomPlayer::Initialize_AnyThread crash

#rb keith.yerex
#jira UE-162912
#preflight 63124f80e11efde08fa5dd0d

[CL 21767360 by jaime cifuentes in ue5-main branch]
This commit is contained in:
jaime cifuentes
2022-09-02 16:51:27 -04:00
parent 06bb1d0a2e
commit 562c89116d

View File

@@ -49,6 +49,7 @@ void FAnimNode_RandomPlayer::Initialize_AnyThread(const FAnimationInitializeCont
}
NormalizedPlayChances.Empty(NormalizedPlayChances.Num());
NormalizedPlayChances.AddUninitialized(NumValidEntries);
// Sanitize the data and sum up the range of the random chances so that
// we can normalize the individual chances below.