From a836e7362f33ea4f4edd62160452a84a9b938e37 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Fri, 28 Aug 2026 00:43:20 +0300 Subject: #6211 Fix crash on setSelectedEnvironment --- indra/newview/llenvironment.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llenvironment.cpp') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index d942715fff..30e83488b3 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1318,6 +1318,11 @@ void LLEnvironment::onSetEnvAssetLoaded(EnvSelection_t env, return; } LL_DEBUGS("ENVIRONMENT") << "Loaded asset: " << asset_id << LL_ENDL; + if (LLApp::isQuitting()) + { + // Probably unreachable, but just in case. + return; + } setEnvironment(env, settings); updateEnvironment(transition); @@ -2540,6 +2545,11 @@ void LLEnvironment::onSetExperienceEnvAssetLoaded(LLUUID experience_id, LLSettin return; } + if (LLApp::isQuitting()) + { + return; + } + if (!environment) { environment = std::dynamic_pointer_cast(getEnvironmentInstance(ENV_PUSH, true)); @@ -3057,6 +3067,10 @@ bool LLEnvironment::loadFromSettings() LLSettingsVOBase::getSettingsAsset(assetId, [this, env_data](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { + if (LLApp::isQuitting()) + { + return; + } // Day should be always applied first, // otherwise it will override sky or water that was set earlier // so wait for asset to load before applying sky/water -- cgit v1.3