From fcc7d161083547e53b2210e20e850794b8faf4c8 Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 1 Jul 2024 17:13:15 +0100 Subject: 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. --- indra/newview/llheroprobemanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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() { -- cgit v1.2.3