diff options
Diffstat (limited to 'src/animation/backend/animationutils.cpp')
-rw-r--r-- | src/animation/backend/animationutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/animation/backend/animationutils.cpp b/src/animation/backend/animationutils.cpp index a5656e230..7e21cba3a 100644 --- a/src/animation/backend/animationutils.cpp +++ b/src/animation/backend/animationutils.cpp @@ -277,7 +277,7 @@ ClipResults evaluateClipAtLocalTime(AnimationClip *clip, float localTime) return quat; }; - const int lowerKeyframeBound = channel.channelComponents[0].fcurve.lowerKeyframeBound(localTime); + const int lowerKeyframeBound = std::max(0, channel.channelComponents[0].fcurve.lowerKeyframeBound(localTime)); const auto lowerQuat = quaternionFromChannel(lowerKeyframeBound); const auto higherQuat = quaternionFromChannel(lowerKeyframeBound + 1); auto cosHalfTheta = QQuaternion::dotProduct(lowerQuat, higherQuat); |