diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-11-16 16:18:01 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-11-16 16:18:01 +0200 |
commit | e95b7efd0b4469ce18bce3bc0261ecc9be06ea9c (patch) | |
tree | 4f72fabc1decf9fea42aeab87bb760e13991b913 | |
parent | 029b41c0419e975bbb28454538b46dc69ce5d2ba (diff) |
SL-16362 FIXED Viewer crashes if settings.xml file is missing
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 12 |
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) |