summaryrefslogtreecommitdiff
path: root/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-11-16 16:18:01 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-11-16 16:18:01 +0200
commite95b7efd0b4469ce18bce3bc0261ecc9be06ea9c (patch)
tree4f72fabc1decf9fea42aeab87bb760e13991b913 /indra/newview/llviewercontrol.cpp
parent029b41c0419e975bbb28454538b46dc69ce5d2ba (diff)
SL-16362 FIXED Viewer crashes if settings.xml file is missing
Diffstat (limited to 'indra/newview/llviewercontrol.cpp')
-rw-r--r--indra/newview/llviewercontrol.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index e5ebbcb9ab..693c24634e 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -107,10 +107,14 @@ static bool handleRenderAvatarMouselookChanged(const LLSD& newvalue)
static bool handleRenderFarClipChanged(const LLSD& newvalue)
{
- F32 draw_distance = (F32) newvalue.asReal();
- gAgentCamera.mDrawDistance = draw_distance;
- LLWorld::getInstance()->setLandFarClip(draw_distance);
- return true;
+ if (LLStartUp::getStartupState() >= STATE_STARTED)
+ {
+ F32 draw_distance = (F32)newvalue.asReal();
+ gAgentCamera.mDrawDistance = draw_distance;
+ LLWorld::getInstance()->setLandFarClip(draw_distance);
+ return true;
+ }
+ return false;
}
static bool handleTerrainDetailChanged(const LLSD& newvalue)