Skip to content

Commit

Permalink
Add an additional null check in BaseKeyframeAnimation (#2486)
Browse files Browse the repository at this point in the history
Fixes #2483
  • Loading branch information
gpeal committed Apr 1, 2024
1 parent b7b5361 commit 6c6e5ff
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -112,7 +112,8 @@ protected float getInterpolatedCurrentKeyframeProgress() {
Keyframe<K> keyframe = getCurrentKeyframe();
// Keyframe should not be null here but there seems to be a Xiaomi Android 10 specific crash.
// https://github.com/airbnb/lottie-android/issues/2050
if (keyframe == null || keyframe.isStatic()) {
// https://github.com/airbnb/lottie-android/issues/2483
if (keyframe == null || keyframe.isStatic() || keyframe.interpolator == null) {
return 0f;
}
//noinspection ConstantConditions
Expand Down

0 comments on commit 6c6e5ff

Please sign in to comment.