summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llkeyframemotion.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-03-01 10:55:47 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-03-01 10:55:47 +0200
commit5715cda6e061294ae344ff6275ee4c643b91bf0f (patch)
tree6d5a14ed98695b6c12602d1b47ac27e7730de13c /indra/llcharacter/llkeyframemotion.cpp
parentb9793dc6e79597fc2c6f518f3a4dad75b5229beb (diff)
parent03db2ddc9c27cf842c6185826617b0da0d2b87f5 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/llcharacter/llkeyframemotion.cpp')
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp14
1 files changed, 14 insertions, 0 deletions
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"))