summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llcontrolavatar.cpp2
-rw-r--r--indra/newview/llviewerjoint.cpp7
2 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 1e8ec4fe0f..6da7163f9f 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -255,7 +255,7 @@ void LLControlAvatar::recursiveScaleJoint(LLJoint* joint, F32 factor)
{
joint->setScale(factor * joint->getScale());
- for (LLJoint::child_list_t::iterator iter = joint->mChildren.begin();
+ for (LLJoint::joints_t::iterator iter = joint->mChildren.begin();
iter != joint->mChildren.end(); ++iter)
{
LLJoint* child = *iter;
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index b7bd131246..a448a95904 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -141,11 +141,10 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
//----------------------------------------------------------------
// render children
//----------------------------------------------------------------
- for (child_list_t::iterator iter = mChildren.begin();
- iter != mChildren.end(); ++iter)
+ for (LLJoint* j : mChildren)
{
- LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(*iter);
- F32 jointLOD = joint->getLOD();
+ LLAvatarJoint* joint = dynamic_cast<LLAvatarJoint*>(j);
+ F32 jointLOD = joint ? joint->getLOD() : 0;
if (pixelArea >= jointLOD || sDisableLOD)
{
triangle_count += joint->render( pixelArea, TRUE, is_dummy );