Add protect code again for animated player

This commit is contained in:
DreamPiggy 2019-11-05 11:30:18 +08:00
parent 6a3f97551c
commit 2c723aa2a3
1 changed files with 2 additions and 2 deletions

View File

@ -221,8 +221,8 @@
NSTimeInterval duration = self.displayLink.duration;
NSUInteger totalFrameCount = self.totalFrameCount;
if (totalFrameCount == 0) {
// Total frame count is 0, wrong configuration
if (totalFrameCount <= 1) {
// Total frame count less than 1, wrong configuration and stop animating
[self stopPlaying];
return;
}