Crash fix for non finite target in editing motion

Ansariel 2012-09-20 20:23:54 +02:00
parent bc34217979
commit 1282cd91d1
1 changed files with 3 additions and 1 deletions

View File

@ -214,8 +214,10 @@ BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask)
target = target * target_dist;
if (!target.isFinite())
{
llerrs << "Non finite target in editing motion with target distance of " << target_dist <<
// Don't error out here, set a fail-safe target vector
llwarns << "Non finite target in editing motion with target distance of " << target_dist <<
" and focus point " << focus_pt << llendl;
target.setVec(1.f, 1.f, 1.f);
}
mTarget.setPosition( target + mParentJoint.getPosition());