From fc690b10fb523d8b80c6a6900a3d3ac63b366c99 Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 1 Feb 2025 14:01:55 +0000 Subject: [PATCH] FIRE-35111 - Crash in LLSD when simulator features is uninitialised. This check is really only needed for OpenSim so plpace an exclusion around it. In addition place a guard on the viewerregion check to protect the opensim calls. This may have a sideffect of return false to "bakesEnabled" when in fact we just don;t know yet. TBC --- indra/newview/llagentwearables.cpp | 15 ++++++++++----- indra/newview/llviewerregion.cpp | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index a9c740eec5..3feb484135 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1098,15 +1098,20 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it const LLWearableType::EType type = new_wearable->getType(); // BOM fallback legacy opensim - if(!gAgent.getRegion()->bakesOnMeshEnabled()) + #ifdef OPENSIM + if (!LLGridManager::getInstance()->isInSecondLife()) { - if(type == LLWearableType::WT_UNIVERSAL) + if(!gAgent.getRegion()->bakesOnMeshEnabled()) { - LL_DEBUGS("Avatar") << "Universal wearable not supported on this region - ignoring." << LL_ENDL; - mismatched++; - continue; + if(type == LLWearableType::WT_UNIVERSAL) + { + LL_DEBUGS("Avatar") << "Universal wearable not supported on this region - ignoring." << LL_ENDL; + mismatched++; + continue; + } } } + #endif // if (type < 0 || type>=LLWearableType::WT_COUNT) { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index bec3cd181b..be87303f36 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3978,7 +3978,7 @@ bool LLViewerRegion::meshUploadEnabled() const bool LLViewerRegion::bakesOnMeshEnabled() const { - return (mSimulatorFeatures.has("BakesOnMeshEnabled") && + return (mSimulatorFeaturesReceived && mSimulatorFeatures.has("BakesOnMeshEnabled") && // FIRE-35111 (bugsplat) checking bakes on mesh feature before features received. mSimulatorFeatures["BakesOnMeshEnabled"].asBoolean()); }