summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdaycycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterdaycycle.cpp')
-rw-r--r--indra/newview/llfloaterdaycycle.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
index c54540d827..8979c7d6f7 100644
--- a/indra/newview/llfloaterdaycycle.cpp
+++ b/indra/newview/llfloaterdaycycle.cpp
@@ -338,10 +338,12 @@ void LLFloaterDayCycle::onStopAnimSky(void* userData)
void LLFloaterDayCycle::onUseLindenTime(void* userData)
{
- LLFloaterWindLight* wl = LLFloaterWindLight::instance();
- LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
- box->selectByValue("");
-
+ LLFloaterWindLight* wlfloater = LLFloaterReg::findTypedInstance<LLFloaterWindLight>("env_windlight");
+ if (wlfloater)
+ {
+ LLComboBox* box = wlfloater->getChild<LLComboBox>("WLPresetsCombo");
+ box->selectByValue("");
+ }
LLWLParamManager::getInstance()->mAnimator.deactivate();
}