diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 94c0217b496e5b1e8e672a22737167d909e0400c..f49c534add7cc0b7c657851171cee98e69271a46 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -445,7 +445,8 @@ LLVector4a LLPolyMorphTarget::getVertexDistortion(S32 requested_index, LLPolyMes //----------------------------------------------------------------------------- const LLVector4a *LLPolyMorphTarget::getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) { - if (!mMorphData) return nullptr; + static LLVector4a zero = LLVector4a::getZero(); + if (!mMorphData) return &zero; LLVector4a* resultVec; mMorphData->mCurrentIndex = 0; @@ -471,7 +472,8 @@ const LLVector4a *LLPolyMorphTarget::getFirstDistortion(U32 *index, LLPolyMesh * //----------------------------------------------------------------------------- const LLVector4a *LLPolyMorphTarget::getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { - if (!mMorphData) return nullptr; + static LLVector4a zero = LLVector4a::getZero(); + if (!mMorphData) return &zero; LLVector4a* resultVec; mMorphData->mCurrentIndex++; diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h index c9228c4ee5f7914b6b45b678c7c941e422f2e3a1..e2b86cb37345d819e102cb9971bac83f489878bd 100644 --- a/indra/llappearance/llpolyskeletaldistortion.h +++ b/indra/llappearance/llpolyskeletaldistortion.h @@ -104,8 +104,8 @@ class alignas(16) LLPolySkeletalDistortion : public LLViewerVisualParam /*virtual*/ const LLVector4a& getAvgDistortion() override { return mDefaultVec; } /*virtual*/ F32 getMaxDistortion() override { return 0.1f; } /*virtual*/ LLVector4a getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) override {return LLVector4a(0.001f, 0.001f, 0.001f);} - /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) override {index = 0; poly_mesh = NULL; return &mDefaultVec;}; - /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) override {index = 0; poly_mesh = NULL; return NULL;}; + /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) override { if( index ){ *index = 0;} if( poly_mesh ){ *poly_mesh = NULL; } return &mDefaultVec; }; + /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) override { if( index ){ *index = 0;} if( poly_mesh ){ *poly_mesh = NULL; } return NULL; }; protected: LLPolySkeletalDistortion(const LLPolySkeletalDistortion& pOther) = default; diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index afcd938ddce54a54b76c85a3d97d3691d8bf4878..dcb557d98dc97ab896b5e80ae096b37acd759f7c 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -734,8 +734,7 @@ void LLWearable::writeToAvatar(LLAvatarAppearance* avatarp) { // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way. - LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param; - if((viewer_param->getWearableType() == mType) && (!viewer_param->getCrossWearable()) ) + if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) ) { S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp index 03a2b8f43ef76d56202e08eadea12d257a504b45..27537b04c9bd23d2c0e288a089a0f3dfe263204c 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -195,10 +195,11 @@ void LLWearableData::pullCrossWearableValues(const LLWearableType::EType type) { if( param ) { - if(param->isDriverParam()) + LLDriverParam *driver_param = dynamic_cast<LLDriverParam*>(param); + if(driver_param) { // parameter is a driver parameter, have it update its cross-driven params - static_cast<LLDriverParam*>(param)->updateCrossDrivenParams(type); + driver_param->updateCrossDrivenParams(type); } } } diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index e9aa4f943fe4f2bbc668e69062eee8083c2a9c70..a63f524fcc93ef2ad1050947b000e959377d47a8 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -110,6 +110,12 @@ class LLWearableType final : public LLParamSingleton<LLWearableType> public: LLWearableDictionary(LLTranslationBridge::ptr_t& trans); ~LLWearableDictionary() = default; + +// [RLVa:KB] - Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-1.2.0a + protected: + // The default implementation asserts on 'notFound()' and returns -1 which isn't a valid EWearableType + virtual LLWearableType::EType notFound() const { return LLWearableType::WT_INVALID; } +// [/RLVa:KB] }; LLWearableDictionary mDictionary;