Fix for assert in AnimBlendDirectional on startup

Specifically, std::vector subscript out of range.
This commit is contained in:
Anthony J. Thibault 2019-11-05 14:16:10 -08:00
parent 23a8029550
commit 6e7f222608

View file

@ -96,7 +96,9 @@ const AnimPoseVec& AnimBlendDirectional::evaluate(const AnimVariantMap& animVars
}
}
_poses.resize(minSize);
blend4(minSize, &poseVecs[0][0], &poseVecs[1][0], &poseVecs[2][0], &poseVecs[3][0], &alphas[0], &_poses[0]);
if (minSize > 0) {
blend4(minSize, &poseVecs[0][0], &poseVecs[1][0], &poseVecs[2][0], &poseVecs[3][0], &alphas[0], &_poses[0]);
}
// animation stack debug stats
for (int i = 0; i < 9; i++) {