From 5a1ce7974b0c58d32c047a814fa94d4072a70de7 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 9 Aug 2024 16:32:11 +0200 Subject: #2230 BugSplat Crash #1502376: SecondLifeViewer!LLPrimitive::isAvatar(606) --- indra/newview/lldrawable.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 60e7171004..3b531c41d9 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1600,18 +1600,10 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update) mDrawable->updateDistance(camera, force_update); - LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren(); - for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); - iter != child_list.end(); iter++) + for (LLViewerObject* child : mDrawable->getVObj()->getChildren()) { - LLViewerObject* child = *iter; LLDrawable* drawable = child->mDrawable; - if (!drawable) - { - continue; - } - - if (!drawable->isAvatar()) + if (drawable && !drawable->isDead() && drawable->isAvatar()) { drawable->updateDistance(camera, force_update); } -- cgit v1.2.3