diff options
Diffstat (limited to 'indra/newview/llviewerjoint.cpp')
-rw-r--r-- | indra/newview/llviewerjoint.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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 ); |