summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-04-11 17:51:10 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-04-11 17:51:10 +0300
commitd248961c306511f633cefedbec5269c7a81e5bc9 (patch)
treef65c2cbfbc5bd2299e49a29a873a4cb3b44d6880 /indra/newview/llenvironment.cpp
parente20aafa2fe200cecf1f4d3ae31294ba0eb5ce194 (diff)
SL-17182 FIXED Viewer crashes after changing the environment settings
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 42f3d15a1c..b76dc6a961 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1155,6 +1155,10 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
mSignalEnvChanged(env, env_version);
}
+void LLEnvironment::setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env)
+{
+ mCurrentEnvironment->setEnvironmentSelection(env);
+}
void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironment::fixedEnvironment_t fixed, S32 env_version)
{
@@ -1761,8 +1765,22 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader* shader)
void LLEnvironment::updateSettingsUniforms()
{
- updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater());
- updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky());
+ if (mCurrentEnvironment->getWater())
+ {
+ updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater());
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for water settings, environment is not properly set" << LL_ENDL;
+ }
+ if (mCurrentEnvironment->getSky())
+ {
+ updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky());
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for sky settings, environment is not properly set" << LL_ENDL;
+ }
}
void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo, LLSettingsBase::Seconds transition)