summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r--indra/newview/llpanelenvironment.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index ecffa34ab9..bc06bde138 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -550,7 +550,7 @@ void LLPanelEnvironmentInfo::onBtnEdit()
(LLFloaterEditExtDayCycle::KEY_CANMOD, LLSD::Boolean(true)));
dayeditor->openFloater(params);
- if (mCurrentEnvironment->mDayCycle)
+ if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle)
dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle);
else
dayeditor->setEditDefaultDayCycle();
@@ -562,7 +562,7 @@ void LLPanelEnvironmentInfo::onBtnSelect()
if (picker)
{
picker->setSettingsFilter(LLSettingsType::ST_NONE);
- picker->setSettingsAssetId((mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null);
+ picker->setSettingsAssetId((mCurrentEnvironment && mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null);
picker->openFloater();
picker->setFocus(TRUE);
}