Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
fix: return when videoItem is nil in startAnimation.
Browse files Browse the repository at this point in the history
  • Loading branch information
errnull committed Apr 7, 2019
1 parent 188c1b3 commit cb27f0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/SVGAPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ - (void)willMoveToSuperview:(UIView *)newSuperview {
}

- (void)startAnimation {
if (self.videoItem == nil) {
NSLog(@"videoItem could not be nil!");
return;
}
[self stopAnimation:NO];
self.loopCount = 0;
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(next)];
Expand Down

0 comments on commit cb27f0f

Please sign in to comment.