From 6ea2847b58164f0ea315f7b2b9c34e663a07e60e Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 5 Jun 2018 17:58:09 +0100 Subject: Fix uninit data from deleting c++11-style init and not putting it in the ctor. Replace dynamic_pointer_cast so instance isn't accidentally deleted on func exit. --- indra/llinventory/llsettingssky.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/llinventory/llsettingssky.cpp') diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 95502f47c3..a6f0d06e7d 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -364,7 +364,9 @@ LLSettingsSky::LLSettingsSky(const LLSD &data) : LLSettingsBase(data), mNextSunTextureId(), mNextMoonTextureId(), - mNextCloudTextureId() + mNextCloudTextureId(), + mPositionsDirty(true), + mLightingDirty(true) { } @@ -372,13 +374,15 @@ LLSettingsSky::LLSettingsSky(): LLSettingsBase(), mNextSunTextureId(), mNextMoonTextureId(), - mNextCloudTextureId() + mNextCloudTextureId(), + mPositionsDirty(true), + mLightingDirty(true) { } void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf) { - LLSettingsSky::ptr_t other((LLSettingsSky*)end.get()); + LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast(end); LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf); replaceSettings(blenddata); -- cgit v1.2.3