|
@@ -72,7 +72,11 @@ AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::s
|
|
|
if(keys.size() != values.size()) {
|
|
|
DOMError("the number of key times does not match the number of keyframe values",&KeyTime);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // check if the key times are well-ordered
|
|
|
+ if(!std::equal(keys.begin(), keys.end() - 1, keys.begin() + 1, std::less<KeyTimeList::value_type>())) {
|
|
|
+ DOMError("the keyframes are not in ascending order",&KeyTime);
|
|
|
+ }
|
|
|
|
|
|
const Element* KeyAttrDataFloat = sc["KeyAttrDataFloat"];
|
|
|
if(KeyAttrDataFloat) {
|