Skip to content

Commit

Permalink
Update UIImage+MultiFormat.m
Browse files Browse the repository at this point in the history
fix <Error>: ImageIO: CGImageSourceCreateWithData data parameter is nil bug
  • Loading branch information
jiangmingz committed Jun 2, 2015
1 parent 91b4251 commit be07912
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SDWebImage/UIImage+MultiFormat.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
@implementation UIImage (MultiFormat)

+ (UIImage *)sd_imageWithData:(NSData *)data {
if (!data) {
return nil;
}

UIImage *image;
NSString *imageContentType = [NSData sd_contentTypeForImageData:data];
if ([imageContentType isEqualToString:@"image/gif"]) {
Expand Down

0 comments on commit be07912

Please sign in to comment.