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

Commit cb27f0f

Browse files
committed
fix: return when videoItem is nil in startAnimation.
1 parent 188c1b3 commit cb27f0f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Source/SVGAPlayer.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ - (void)willMoveToSuperview:(UIView *)newSuperview {
5454
}
5555

5656
- (void)startAnimation {
57+
if (self.videoItem == nil) {
58+
NSLog(@"videoItem could not be nil!");
59+
return;
60+
}
5761
[self stopAnimation:NO];
5862
self.loopCount = 0;
5963
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(next)];

0 commit comments

Comments
 (0)