Fix NPE in ValueAnimator am: 543a7ed7af

am: 705e2fb40c

Change-Id: I5beab0d64c1544344f1153f183c513839f673a1f
This commit is contained in:
Justin Klaassen
2016-07-26 15:11:27 +00:00
committed by android-build-merger
2 changed files with 2 additions and 1 deletions

View File

@@ -977,7 +977,7 @@ public final class ObjectAnimator extends ValueAnimator {
@Override
void animateValue(float fraction) {
final Object target = getTarget();
if (mTarget != null && target == null) {
if (target == null) {
// We lost the target reference, cancel and clean up.
cancel();
return;

View File

@@ -982,6 +982,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio
mStarted = true;
mPaused = false;
mRunning = false;
mAnimationEndRequested = false;
// Resets mLastFrameTime when start() is called, so that if the animation was running,
// calling start() would put the animation in the
// started-but-not-yet-reached-the-first-frame phase.