Merge "Allow null target in ObjectAnimator if the target has never been set" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f574ba6eed
@@ -977,8 +977,9 @@ public final class ObjectAnimator extends ValueAnimator {
|
||||
@Override
|
||||
void animateValue(float fraction) {
|
||||
final Object target = getTarget();
|
||||
if (target == null) {
|
||||
// We lost the target reference, cancel and clean up.
|
||||
if (mTarget != null && target == null) {
|
||||
// We lost the target reference, cancel and clean up. Note: we allow null target if the
|
||||
/// target has never been set.
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user