summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-04-20 13:18:56 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-04-20 13:18:56 -0400
commit0447fe5a57c2b3e0406fd28b665ea9f47d689b2f (patch)
treee8117a3d738c8f5490eb06c7987e3802e35bc5fa /indra/newview
parentb092147a0be579e102c9210c6c99110862e9ad02 (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-xindra/newview/llvoavatar.cpp8
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;