summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-11-09 14:58:26 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-11-09 14:58:26 -0500
commitfcf2f235b763a4e1e2814685c3086da3933eac74 (patch)
tree3198a08f52549424e3076d5863be1404315c0443
parentbe11d020ca6b941ec86622718c9eeafd5fddb7b5 (diff)
SL-263 FIX - fallback code to prevent crash, won't be invoked unless there's a bug somewhere upstream.
-rw-r--r--indra/newview/llskinningutil.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index c32345cbe9..279035d769 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -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;
+ }
}
}