From aa1dd6bb7b5325bb65a0a979e00e6b537621bed9 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 16 Jul 2019 18:31:58 +0300 Subject: SL-11597 Fix crash on dead object --- indra/newview/llvoavatar.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 5004cbec4c..5584efeb7b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8245,16 +8245,19 @@ void LLVOAvatar::updateMeshTextures() ++attachment_iter) { LLViewerObject* attached_object = (*attachment_iter); - attached_object->refreshBakeTexture(); - - LLViewerObject::const_child_list_t& child_list = attached_object->getChildren(); - for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); - iter != child_list.end(); ++iter) + if (attached_object && !attached_object->isDead()) { - LLViewerObject* objectp = *iter; - if (objectp) + attached_object->refreshBakeTexture(); + + LLViewerObject::const_child_list_t& child_list = attached_object->getChildren(); + for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); + iter != child_list.end(); ++iter) { - objectp->refreshBakeTexture(); + LLViewerObject* objectp = *iter; + if (objectp && !objectp->isDead()) + { + objectp->refreshBakeTexture(); + } } } } -- cgit v1.2.3