You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The offending commit adds the following code to SolidLayer.java:
if (colorAnimation != null) {
paint.setColor(colorAnimation.getValue());
}
colorAnimation can be backed by a LottieValueCallback. Thus colorAnimation.getValue() can return null. When this happens paint.setColor(colorAnimation.getValue()); will crash with a NPE as it tries to dereference a null boxed type (Integer).
What version of Lottie did you test this on?
v6.2.0.
What version of Android did you test this on?
This crash occurs on all versions of Android that Lottie supports.
Steps To Reproduce
Steps to reproduce the behavior:
Add a LottieAnimationView to any screen.
Add a color value callback to the LottieAnimationView that just returns null for the value. Eg. (kotlin)
Describe the bug
LottieValueCallback
is allowed to return null to indicate the default value should be used as it's documentation states (lottie-android/lottie/src/main/java/com/airbnb/lottie/value/LottieValueCallback.java
Line 51 in 664c8e3
The commit a808c3f introduced a crash.
The offending commit adds the following code to SolidLayer.java:
colorAnimation
can be backed by aLottieValueCallback
. ThuscolorAnimation.getValue()
can return null. When this happenspaint.setColor(colorAnimation.getValue());
will crash with a NPE as it tries to dereference a null boxed type (Integer
).What version of Lottie did you test this on?
v6.2.0.
What version of Android did you test this on?
This crash occurs on all versions of Android that Lottie supports.
Steps To Reproduce
Steps to reproduce the behavior:
LottieAnimationView
to any screen.LottieAnimationView
that just returns null for the value. Eg. (kotlin)lottie.json
The text was updated successfully, but these errors were encountered: