diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-05-27 17:28:27 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-05-27 17:29:08 +0300 |
commit | fc110b4362fb5af7b64c014fb6c746afb9c27bdb (patch) | |
tree | 4ad7c148efe7040f64cad148482cc7e666c7fe90 /indra/newview/llenvironment.cpp | |
parent | a3e5fe369f7593fb38e37ab3de549f7d503336c9 (diff) |
SL-13327 Crash at LLViewerRegion::getWaterHeight
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r-- | indra/newview/llenvironment.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 7cf3cd5df1..e56ed92d9e 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1000,7 +1000,7 @@ bool LLEnvironment::canAgentUpdateRegionEnvironment() const if (gAgent.isGodlike()) return true; - return gAgent.getRegion()->canManageEstate(); + return gAgent.canManageEstate(); } bool LLEnvironment::isExtendedEnvironmentEnabled() const @@ -1056,7 +1056,8 @@ F32 LLEnvironment::getCamHeight() const F32 LLEnvironment::getWaterHeight() const { - return gAgent.getRegion()->getWaterHeight(); + LLViewerRegion* cur_region = gAgent.getRegion(); + return cur_region ? cur_region->getWaterHeight() : DEFAULT_WATER_HEIGHT; } bool LLEnvironment::getIsSunUp() const |