From 7171e581f968f71b83be28ac610854bd61b7e8a1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 18 Mar 2019 17:08:17 +0200 Subject: BUG-226547 Crashfixes --- indra/newview/llpanelenvironment.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelenvironment.cpp') 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]; -- cgit v1.3