summaryrefslogtreecommitdiff
path: root/indra/llinventory/llsettingssky.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-06-05 17:58:09 +0100
committerGraham Linden <graham@lindenlab.com>2018-06-05 17:58:09 +0100
commit6ea2847b58164f0ea315f7b2b9c34e663a07e60e (patch)
tree355cb3a7a00c0dda619f329c21409e9e3e69bd54 /indra/llinventory/llsettingssky.cpp
parent499993e3aa89f49412861a6b7daff8e0e6f1c196 (diff)
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.
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r--indra/llinventory/llsettingssky.cpp10
1 files changed, 7 insertions, 3 deletions
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<LLSettingsSky>(end);
LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf);
replaceSettings(blenddata);