summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-03-01 02:28:15 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-03-01 02:28:15 +0200
commit27e197459da275d2cd8847aa36e6c6bc4720e5c5 (patch)
treefccc0ceaac90e03939d37e54cb8519a0132993cf /indra/llcharacter
parent1a1465dab94a2829cedb4ee4cd0c0169cea0fdeb (diff)
parent2ab914a9cdd1ad809879aca05dbf4b624949ecea (diff)
Merge
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llcharacter.h2
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp14
2 files changed, 15 insertions, 1 deletions
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 1a3e307663..2fac5f53a6 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -177,7 +177,7 @@ public:
virtual LLVector3 getVolumePos(S32 joint_index, LLVector3& volume_offset) { return LLVector3::zero; }
- virtual LLJoint* findCollisionVolume(U32 volume_id) { return NULL; }
+ virtual LLJoint* findCollisionVolume(S32 volume_id) { return NULL; }
virtual S32 getCollisionVolumeID(std::string &name) { return -1; }
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 330d812985..5d323ed5d6 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1772,6 +1772,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id)
bin_data[BIN_DATA_LENGTH] = 0; // Ensure null termination
str = (char*)bin_data;
constraintp->mSourceConstraintVolume = mCharacter->getCollisionVolumeID(str);
+ if (constraintp->mSourceConstraintVolume == -1)
+ {
+ LL_WARNS() << "not a valid source constraint volume " << str
+ << " for animation " << asset_id << LL_ENDL;
+ delete constraintp;
+ return FALSE;
+ }
if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset"))
{
@@ -1808,6 +1815,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id)
{
constraintp->mConstraintTargetType = CONSTRAINT_TARGET_TYPE_BODY;
constraintp->mTargetConstraintVolume = mCharacter->getCollisionVolumeID(str);
+ if (constraintp->mTargetConstraintVolume == -1)
+ {
+ LL_WARNS() << "not a valid target constraint volume " << str
+ << " for animation " << asset_id << LL_ENDL;
+ delete constraintp;
+ return FALSE;
+ }
}
if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset"))