From c721152c444ee7a13e4217f86dfcce34b7488ee5 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 8 Feb 2024 14:54:01 -0600 Subject: Fix for crash in LLHeroProbeManager --- indra/newview/llheroprobemanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llheroprobemanager.cpp') diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index a105fd2fa8..c66054f618 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -126,7 +126,7 @@ void LLHeroProbeManager::update() for (auto vo : mHeroVOList) { - if (vo) + if (vo && !vo->isDead()) { if (vo->mDrawable.notNull()) { @@ -148,7 +148,7 @@ void LLHeroProbeManager::update() } } - if (mNearestHero != nullptr && mNearestHero->mDrawable.notNull()) + if (mNearestHero != nullptr && !mNearestHero->isDead() && mNearestHero->mDrawable.notNull()) { LLVector3 hero_pos = mNearestHero->getPositionAgent(); LLVector3 face_normal = LLVector3(0, 0, 1); @@ -168,6 +168,10 @@ void LLHeroProbeManager::update() probe_pos.load3(point.mV); } + else + { + mNearestHero = nullptr; + } mHeroProbeStrength = 1; } -- cgit v1.2.3