diff --git a/Source/SVGAPlayer.m b/Source/SVGAPlayer.m index ac46fb5..a3c9b9a 100644 --- a/Source/SVGAPlayer.m +++ b/Source/SVGAPlayer.m @@ -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)];