Null joint states are getting in the joint map somehow. Added assertions to hunt this down.

This commit is contained in:
Shyotl
2011-07-20 23:52:23 -05:00
parent fe0cd9f702
commit a399452d20

View File

@@ -89,6 +89,7 @@ LLJointState *LLPose::getNextJointState()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState) BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
{ {
llassert_always(jointState.notNull());
if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end()) if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end())
{ {
mJointMap[jointState->getJoint()->getName()] = jointState; mJointMap[jointState->getJoint()->getName()] = jointState;
@@ -161,6 +162,9 @@ void LLPose::setWeight(F32 weight)
// <edit> // <edit>
// there was a crash here // there was a crash here
// </edit> // </edit>
llassert_always(iter->second.notNull());
if(!iter->second) //uhoh...
continue;
iter->second->setWeight(weight); iter->second->setWeight(weight);
} }
mWeight = weight; mWeight = weight;