summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeq <beqjanus@gmail.com>2024-07-01 17:13:15 +0100
committerBeq <beqjanus@gmail.com>2024-07-01 17:22:07 +0100
commitfcc7d161083547e53b2210e20e850794b8faf4c8 (patch)
tree983879bd138d3097d721fb4023d5cf57367bd9f9
parentc63cfaa15dc6829b50fda3a024295f7c0b022650 (diff)
Fix for various TP where a mirror is present
these manifest as crashes in isDynamic, isBox and similar calls that are accessed through a dangling probe.
-rw-r--r--indra/newview/llheroprobemanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index 66ccdd2b32..cbe1105024 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -121,6 +121,7 @@ void LLHeroProbeManager::update()
// Find our nearest hero candidate.
float last_distance = 99999.f;
float camera_center_distance = 99999.f;
+ mNearestHero = nullptr;
for (auto vo : mHeroVOList)
{
if (vo && !vo->isDead() && vo->mDrawable.notNull() && vo->isReflectionProbe() && vo->getReflectionProbeIsBox())
@@ -194,11 +195,17 @@ void LLHeroProbeManager::update()
else
{
mNearestHero = nullptr;
+ mDefaultProbe->mViewerObject = nullptr;
}
mHeroProbeStrength = 1;
}
+ else
+ {
+ mNearestHero = nullptr;
+ mDefaultProbe->mViewerObject = nullptr;
}
+}
void LLHeroProbeManager::renderProbes()
{