diff options
| author | Graham Linden <graham@lindenlab.com> | 2018-08-07 22:47:55 +0100 | 
|---|---|---|
| committer | Graham Linden <graham@lindenlab.com> | 2018-08-07 22:47:55 +0100 | 
| commit | 126191ada56cf5daa694493a9ad5188beda11253 (patch) | |
| tree | 1aa34922acfa3da590dfbb1fd2e20a157a45e9b0 | |
| parent | cd5f7b2c03e87cc5d236eaa5b8c025530571376a (diff) | |
Protect sky code from (extremely unlikely yet still possible) lack of sky settings.
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
| -rw-r--r-- | indra/newview/llvosky.cpp | 7 | 
2 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d30657a30a..7e7b7fda84 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8664,7 +8664,7 @@      <key>Type</key>      <string>Boolean</string>      <key>Value</key> -    <integer>0</integer> +    <integer>1</integer>    </map>    <key>RenderLocalLights</key>    <map> 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)  | 
