[FIRE-36091] Fix crash in updateDistance updating LOD on null mVObjp
Merged upstream in SLViewer PR#4988master
parent
b3a549b8b5
commit
17ff1613f1
|
|
@ -938,7 +938,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
|
||||
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
|
||||
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
|
||||
mVObjp->updateLOD();
|
||||
if (mVObjp)
|
||||
{
|
||||
mVObjp->updateLOD();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -949,7 +952,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
|
|||
|
||||
pos -= camera.getOrigin();
|
||||
mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
|
||||
mVObjp->updateLOD();
|
||||
if (mVObjp)
|
||||
{
|
||||
mVObjp->updateLOD();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue