SL-263 FIX - fallback code to prevent crash, won't be invoked unless there's a bug somewhere upstream.

meow-7.2.2
Brad Payne (Vir Linden) 2015-11-09 14:58:26 -05:00
parent be11d020ca
commit fcf2f235b7
1 changed files with 12 additions and 1 deletions

View File

@ -232,7 +232,18 @@ void LLSkinningUtil::initSkinningMatrixPalette(
{
LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
mat[j] = skin->mInvBindMatrix[j];
mat[j] *= joint->getWorldMatrix();
if (joint)
{
mat[j] *= joint->getWorldMatrix();
}
else
{
// This shouldn't happen - in mesh upload, skinned
// rendering should be disabled unless all joints are
// valid. In other cases of skinned rendering, invalid
// joints should already have been removed during remap.
LL_WARNS_ONCE("Avatar") << "Rigged to invalid joint name " << skin->mJointNames[j] << LL_ENDL;
}
}
}