Merge "Guard against an NPE if a view is removed just after a path animation started." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-01 22:04:18 +00:00
committed by Android (Google) Code Review

View File

@@ -1037,6 +1037,11 @@ public class PhysicsAnimationLayout extends FrameLayout {
if (view != null) { if (view != null) {
final SpringAnimation animation = final SpringAnimation animation =
(SpringAnimation) view.getTag(getTagIdForProperty(property)); (SpringAnimation) view.getTag(getTagIdForProperty(property));
if (animation == null) {
return;
}
final SpringForce animationSpring = animation.getSpring(); final SpringForce animationSpring = animation.getSpring();
if (animationSpring == null) { if (animationSpring == null) {