diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-20 13:18:56 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-20 13:18:56 -0400 |
commit | 0447fe5a57c2b3e0406fd28b665ea9f47d689b2f (patch) | |
tree | e8117a3d738c8f5490eb06c7987e3802e35bc5fa /indra/newview | |
parent | b092147a0be579e102c9210c6c99110862e9ad02 (diff) |
SL-371 - increased the limit for StackWalker strings, avoid crashing if mesh has wrong number of mAlternateBindMatrix matrices
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a82f92b01a..af10af98f2 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5299,9 +5299,13 @@ void LLVOAvatar::addAttachmentPosOverridesForObject(LLViewerObject *vo) if ( vobj && vobj->isAttachment() && vobj->isMesh() && pSkinData ) { const int bindCnt = pSkinData->mAlternateBindMatrix.size(); - if ( bindCnt > 0 ) + const int jointCnt = pSkinData->mJointNames.size(); + if ((bindCnt > 0) && (bindCnt != jointCnt)) + { + LL_WARNS_ONCE() << "invalid mesh, bindCnt " << bindCnt << "!= jointCnt " << jointCnt << ", joint overrides will be ignored." << LL_ENDL; + } + if ((bindCnt > 0) && (bindCnt == jointCnt)) { - const int jointCnt = pSkinData->mJointNames.size(); const F32 pelvisZOffset = pSkinData->mPelvisOffset; const LLUUID& mesh_id = pSkinData->mMeshID; bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false; |