From 6c6e5ff71ffdc46c920348a573dc3ce6bbe25f59 Mon Sep 17 00:00:00 2001 From: Gabriel Peal Date: Mon, 1 Apr 2024 16:56:40 -0700 Subject: [PATCH] Add an additional null check in BaseKeyframeAnimation (#2486) Fixes #2483 --- .../lottie/animation/keyframe/BaseKeyframeAnimation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 1f8ec208c1..5f94a927bc 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 @@ -112,7 +112,8 @@ protected float getInterpolatedCurrentKeyframeProgress() { Keyframe 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