diff --git a/SDWebImage/UIImage+GIF.m b/SDWebImage/UIImage+GIF.m index e1ded2aa..e6d8577d 100755 --- a/SDWebImage/UIImage+GIF.m +++ b/SDWebImage/UIImage+GIF.m @@ -32,6 +32,8 @@ for (size_t i = 0; i < count; i++) { CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL); + if (!image) + continue; duration += [self sd_frameDurationAtIndex:i source:source];