commit | a17e7fdf91027203e153102f44d19ffaa2426a53 | [log] [tgz] |
---|---|---|
author | Gabriel Peal <gpeal@users.noreply.github.com> | Fri Jan 11 10:03:01 2019 -0800 |
committer | GitHub <noreply@github.com> | Fri Jan 11 10:03:01 2019 -0800 |
tree | f3a7e04f90fe403a80108abc9cd8ba5923127972 | |
parent | 3c0df996cbf5afbac380f4974bf668c33cc8e818 [diff] |
Prevent an OOBE (#1084)
diff --git a/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java b/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java index 42c3a7e..83813d4 100644 --- a/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java +++ b/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/BaseKeyframeAnimation.java
@@ -51,6 +51,9 @@ } public void setProgress(@FloatRange(from = 0f, to = 1f) float progress) { + if (keyframes.isEmpty()) { + return; + } // Must use hashCode() since the actual object instance will be returned // from getValue() below with the new values. Keyframe<K> previousKeyframe = getCurrentKeyframe();