summaryrefslogtreecommitdiff
path: root/indra/newview/llenvmanager.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-04-18 22:13:49 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-04-18 22:13:49 +0300
commitfc71ae3e69e78a2e34832418c6c120c9e633bbb6 (patch)
tree7b7a0f0074fc4c927ccf209955392d3f45862ddc /indra/newview/llenvmanager.cpp
parentfa87eaa1b0fef33ace91862bef0ae722cab124e8 (diff)
STORM-1180 FIX Temporarily disabled region environment controls.
Besides, adding a workaround for a crash on exit I've experienced.
Diffstat (limited to 'indra/newview/llenvmanager.cpp')
-rw-r--r--indra/newview/llenvmanager.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index 687f9974b1..c855d8597c 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -302,7 +302,18 @@ bool LLEnvManager::processIncomingMessage(const LLSD& unvalidated_content, const
if (valid)
{
- F32 sun_hour = LLPanelRegionTerrainInfo::instance()->getSunHour(); // this slider is kept up to date
+ F32 sun_hour = 0;
+ LLPanelRegionTerrainInfo* terrain_panel = LLPanelRegionTerrainInfo::instance();
+
+ if (terrain_panel)
+ {
+ sun_hour = terrain_panel->getSunHour(); // this slider is kept up to date
+ }
+ else
+ {
+ llwarns << "Cannot instantiate the terrain panel (exiting?)" << llendl;
+ }
+
LLWLParamManager::getInstance()->addAllSkies(scope, windlight_llsd[2]);
LLEnvironmentSettings newSettings(windlight_llsd[1], windlight_llsd[2], windlight_llsd[3], sun_hour);
mOrigSettingStore[scope] = newSettings;