diff options
author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-08-06 14:17:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-06 14:17:18 +0300 |
commit | acc8928330fe1e5022a1e968afe7d7027b86a63a (patch) | |
tree | b95453ecc772cb4eaf275aab6fb5a882087a4c33 /indra/newview/llskinningutil.cpp | |
parent | c25df5224f7bf150ddc56014b0389985da2eb542 (diff) | |
parent | f338b91f7c9dbfe999b5ea9a1facb9eaeafb3407 (diff) |
Merge release/2025.05 into develop
Diffstat (limited to 'indra/newview/llskinningutil.cpp')
-rw-r--r-- | indra/newview/llskinningutil.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index cee43f3cff..47f58afa00 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -135,6 +135,12 @@ void LLSkinningUtil::initSkinningMatrixPalette( initJointNums(const_cast<LLMeshSkinInfo*>(skin), avatar); + if (skin->mInvBindMatrix.size() < count ) + { + // faulty model? mInvBindMatrix.size() should have matched mJointNames.size() + return; + } + LLMatrix4a world[LL_CHARACTER_MAX_ANIMATED_JOINTS]; for (S32 j = 0; j < count; ++j) @@ -354,7 +360,8 @@ void LLSkinningUtil::updateRiggingInfo(const LLMeshSkinInfo* skin, LLVOAvatar *a { rig_info_tab[joint_num].setIsRiggedTo(true); - const LLMatrix4a& mat = skin->mBindPoseMatrix[joint_index]; + size_t bind_poses_size = skin->mBindPoseMatrix.size(); + const LLMatrix4a& mat = bind_poses_size > joint_index ? skin->mBindPoseMatrix[joint_index] : LLMatrix4a::identity(); LLVector4a pos_joint_space; mat.affineTransform(pos, pos_joint_space); |