Commit 37999412 authored by NiranV's avatar NiranV
Browse files

Fixed: Crash when touching day cycle editor controls after opening it when...

Fixed: Crash when touching day cycle editor controls after opening it when there hasn't been any active day cycle yet in this session.
parent a09e3a14
......@@ -161,22 +161,24 @@ class LLDaySettingCopiedCallback : public LLInventoryCallback
//=========================================================================
LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
LLFloater(key),
mFlyoutControl(nullptr),
mDayLength(0),
mCurrentTrack(1),
mShiftCopyEnabled(false),
mTimeSlider(nullptr),
mFramesSlider(nullptr),
mCurrentTimeLabel(nullptr),
mImportButton(nullptr),
mInventoryId(),
mInventoryItem(nullptr),
mLoadFrame(nullptr),
mSkyBlender(),
mWaterBlender(),
mScratchSky(),
mScratchWater(),
LLFloater(key),
mFlyoutControl(nullptr),
mDayLength(0),
mCurrentTrack(1),
mShiftCopyEnabled(false),
mTimeSlider(nullptr),
mFramesSlider(nullptr),
mCurrentTimeLabel(nullptr),
mImportButton(nullptr),
mInventoryId(),
mInventoryItem(nullptr),
mLoadFrame(nullptr),
mSkyBlender(),
mWaterBlender(),
mScratchSky(),
mScratchWater(),
//BD
mScratchDay(),
mIsPlaying(false),
mIsDirty(false),
mCanSave(false),
......@@ -193,6 +195,8 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) :
mScratchSky = LLSettingsVOSky::buildDefaultSky();
mScratchWater = LLSettingsVOWater::buildDefaultWater();
//BD
mScratchDay = LLSettingsVODay::buildDefaultDayCycle();
mEditSky = mScratchSky;
mEditWater = mScratchWater;
......@@ -324,7 +328,10 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
day_cycle = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_LOCAL);
if (day_cycle)
setEditDayCycle(day_cycle);
}
//BD - Fix crash due to empty daycycle when we haven't had any set up yet and open the daycycle editor.
else
setEditDayCycle(mScratchDay);
}
}
}
......
......@@ -230,6 +230,9 @@ class LLFloaterEditExtDayCycle : public LLFloater
LLTrackBlenderLoopingManual::ptr_t mWaterBlender;
LLSettingsSky::ptr_t mScratchSky;
LLSettingsWater::ptr_t mScratchWater;
//BD
LLSettingsDay::ptr_t mScratchDay;
LLSettingsBase::ptr_t mCurrentEdit;
LLSettingsSky::ptr_t mEditSky;
LLSettingsWater::ptr_t mEditWater;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment