| Index: ui/compositor/layer_animator.cc
|
| diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
|
| index 39585a7c946e5a7656d46f02739826e1754e8a69..adff73fe89afe1be63b1d5f930a468b9f5be4d9f 100644
|
| --- a/ui/compositor/layer_animator.cc
|
| +++ b/ui/compositor/layer_animator.cc
|
| @@ -409,7 +409,7 @@ void LayerAnimator::Step(base::TimeTicks now) {
|
|
|
| void LayerAnimator::StopAnimatingInternal(bool abort) {
|
| scoped_refptr<LayerAnimator> retain(this);
|
| - while (is_animating()) {
|
| + while (is_animating() && delegate()) {
|
| // We're going to attempt to finish the first running animation. Let's
|
| // ensure that it's valid.
|
| PurgeDeletedAnimations();
|
| @@ -517,6 +517,8 @@ void LayerAnimator::FinishAnimation(
|
| sequence->Abort(delegate());
|
| else
|
| ProgressAnimationToEnd(sequence);
|
| + if (!delegate())
|
| + return;
|
| ProcessQueue();
|
| UpdateAnimationState();
|
| }
|
|
|