summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelenvironment.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-03-18 17:08:17 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-03-18 17:08:17 +0200
commit7171e581f968f71b83be28ac610854bd61b7e8a1 (patch)
tree449cbcb748433d04c8c5fdb7b0846cc6db47517d /indra/newview/llpanelenvironment.cpp
parentbf8530c93662c5c8796124e24ea344b4c4460734 (diff)
BUG-226547 Crashfixes
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r--indra/newview/llpanelenvironment.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index ef307ad079..44806e7d23 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -335,9 +335,12 @@ void LLPanelEnvironmentInfo::refreshFromEstate()
std::string LLPanelEnvironmentInfo::getNameForTrackIndex(S32 index)
{
-
std::string invname;
- if (mCurrentEnvironment->mDayCycleName.empty())
+ if (mCurrentEnvironment || index < LLSettingsDay::TRACK_WATER || index >= LLSettingsDay::TRACK_MAX)
+ {
+ invname = getString(STRING_EMPTY_NAME);
+ }
+ else if (mCurrentEnvironment->mDayCycleName.empty())
{
invname = mCurrentEnvironment->mNameList[index];