From 68456b3fe31766baaa791fc20cec2f1eab47657e Mon Sep 17 00:00:00 2001 From: featherless Date: Wed, 22 Nov 2017 15:29:48 -0500 Subject: [PATCH] If timeScaleFactor is 0 then exit early. (#58) --- src/MDMMotionAnimator.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MDMMotionAnimator.m b/src/MDMMotionAnimator.m index f51f908..41bf85e 100644 --- a/src/MDMMotionAnimator.m +++ b/src/MDMMotionAnimator.m @@ -71,6 +71,11 @@ - (void)animateWithTiming:(MDMMotionTiming)timing }; CGFloat timeScaleFactor = [self computedTimeScaleFactor]; + if (timeScaleFactor == 0) { + exitEarly(); + return; + } + CABasicAnimation *animation = MDMAnimationFromTiming(timing, timeScaleFactor); if (animation == nil) {