diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-18 17:08:17 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-03-18 17:08:17 +0200 |
commit | 7171e581f968f71b83be28ac610854bd61b7e8a1 (patch) | |
tree | 449cbcb748433d04c8c5fdb7b0846cc6db47517d /indra | |
parent | bf8530c93662c5c8796124e24ea344b4c4460734 (diff) |
BUG-226547 Crashfixes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 7 |
2 files changed, 17 insertions, 16 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 235a9b4d53..4b88b4d7af 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -927,19 +927,9 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data) { std::string curslider = mFramesSlider->getCurSlider(); - F32 sliderpos(0.0); - - - if (curslider.empty()) - { - S32 x(0), y(0); - LLUI::getMousePositionLocal(mFramesSlider, &x, &y); - - sliderpos = mFramesSlider->getSliderValueFromPos(x, y); - } - else + if (!curslider.empty() && mEditDay) { - sliderpos = mFramesSlider->getCurSliderValue(); + F32 sliderpos = mFramesSlider->getCurSliderValue(); keymap_t::iterator it = mSliderKeyMap.find(curslider); if (it != mSliderKeyMap.end()) @@ -1528,7 +1518,11 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() LLTabContainer * tabs = mWaterTabLayoutContainer->getChild<LLTabContainer>(TABS_WATER); if (mCurrentTrack == LLSettingsDay::TRACK_WATER) { - if (!mFramesSlider->getCurSlider().empty()) + if (!mEditDay) + { + canedit = false; + } + else if (!mFramesSlider->getCurSlider().empty()) { canedit = !mIsPlaying; // either search mEditDay or retrieve from mSliderKeyMap @@ -1557,7 +1551,11 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() tabs = mSkyTabLayoutContainer->getChild<LLTabContainer>(TABS_SKYS); if (mCurrentTrack != LLSettingsDay::TRACK_WATER) { - if (!mFramesSlider->getCurSlider().empty()) + if (!mEditDay) + { + canedit = false; + } + else if (!mFramesSlider->getCurSlider().empty()) { canedit = !mIsPlaying; // either search mEditDay or retrieve from mSliderKeyMap 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]; |