summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-28 00:43:20 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-08-28 21:00:35 +0300
commita836e7362f33ea4f4edd62160452a84a9b938e37 (patch)
treedeb9de9e52e42c6336e42ceb8842105358f5d411 /indra/newview/llenvironment.cpp
parente7980b05d9e7d330f151cbedc3c75622c50e58a2 (diff)
#6211 Fix crash on setSelectedEnvironment
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp14
1 files changed, 14 insertions, 0 deletions
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<DayInjection>(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