avoid crash.

This commit is contained in:
PonyCui
2017-02-22 17:55:16 +08:00
parent 873e32fa43
commit 5b95614989
2 changed files with 2 additions and 2 deletions

View File

@@ -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];

View File

@@ -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];