mirror of
https://github.com/svga/SVGAPlayer-iOS.git
synced 2025-10-21 07:29:14 +08:00
avoid crash.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
self.aPlayer.loops = 0;
|
||||
self.aPlayer.clearsAfterStop = YES;
|
||||
SVGAParser *parser = [[SVGAParser alloc] init];
|
||||
[parser parseWithURL:[NSURL URLWithString:@"http://legox.yy.com/svga/svga-me/rainbowrose.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
[parser parseWithURL:[NSURL URLWithString:@"http://legox.yy.com/svga/svga-vector/PinJump.svga"] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
if (videoItem != nil) {
|
||||
self.aPlayer.videoItem = videoItem;
|
||||
[self.aPlayer startAnimation];
|
||||
|
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
- (void)stepToFrame:(NSInteger)frame andPlay:(BOOL)andPlay {
|
||||
if (frame >= self.videoItem.frames) {
|
||||
if (frame >= self.videoItem.frames || frame < 0) {
|
||||
return;
|
||||
}
|
||||
[self pauseAnimation];
|
||||
|
Reference in New Issue
Block a user