From feb3084d615d7e53718036841114a96621bfd27e Mon Sep 17 00:00:00 2001 From: Tsvetan Raikov Date: Tue, 19 Apr 2016 16:55:15 +0300 Subject: [PATCH] Fix animations crash --- ui/animation/keyframe-animation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/animation/keyframe-animation.ts b/ui/animation/keyframe-animation.ts index 4352e1267..b77a4ccb1 100644 --- a/ui/animation/keyframe-animation.ts +++ b/ui/animation/keyframe-animation.ts @@ -105,7 +105,9 @@ export class KeyframeAnimation { this._isPlaying = false; for (let i = this._nativeAnimations.length - 1; i >= 0; i--) { let animation = this._nativeAnimations[i]; - animation.cancel(); + if (animation.isPlaying) { + animation.cancel(); + } } this._rejectAnimationFinishedPromise(); }