summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llheroprobemanager.cpp8
-rw-r--r--indra/newview/llheroprobemanager.h4
2 files changed, 8 insertions, 4 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;
}
diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h
index 5ec1101b45..9151189a92 100644
--- a/indra/newview/llheroprobemanager.h
+++ b/indra/newview/llheroprobemanager.h
@@ -137,7 +137,7 @@ private:
bool mRenderingMirror = false;
bool mHasMirrors = false;
- std::set<LLVOVolume*> mHeroVOList;
- LLVOVolume* mNearestHero;
+ std::set<LLPointer<LLVOVolume>> mHeroVOList;
+ LLPointer<LLVOVolume> mNearestHero;
};