summaryrefslogtreecommitdiff
path: root/indra/newview/llvosky.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r--indra/newview/llvosky.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index 899da3e420..64be033fdc 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -1418,8 +1418,11 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
void LLVOSky::updateFog(const F32 distance)
{
LLEnvironment& environment = LLEnvironment::instance();
- LLVector3 light_dir = LLVector3(environment.getClampedLightNorm());
- m_legacyAtmospherics.updateFog(distance, light_dir);
+ if (environment.getCurrentSky() != nullptr)
+ {
+ LLVector3 light_dir = LLVector3(environment.getClampedLightNorm());
+ m_legacyAtmospherics.updateFog(distance, light_dir);
+ }
}
void LLVOSky::setSunAndMoonDirectionsCFR(const LLVector3 &sun_dir_cfr, const LLVector3 &moon_dir_cfr)