summaryrefslogtreecommitdiff
path: root/indra/newview/llheroprobemanager.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-02-08 14:54:01 -0600
committerRunitaiLinden <davep@lindenlab.com>2024-02-08 14:54:01 -0600
commitc721152c444ee7a13e4217f86dfcce34b7488ee5 (patch)
tree617fd01807d2380322a06a22ad0ede1a3f20c0d5 /indra/newview/llheroprobemanager.cpp
parent97d2b216212b3e106bb9129689e8eb162f9f68f5 (diff)
Fix for crash in LLHeroProbeManager
Diffstat (limited to 'indra/newview/llheroprobemanager.cpp')
-rw-r--r--indra/newview/llheroprobemanager.cpp8
1 files changed, 6 insertions, 2 deletions
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;
}