diff --git a/SDWebImage/SDWebImageCompat.m b/SDWebImage/SDWebImageCompat.m index 7f911535e..8c7d345ab 100644 --- a/SDWebImage/SDWebImageCompat.m +++ b/SDWebImage/SDWebImageCompat.m @@ -13,6 +13,10 @@ #endif inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) { + if (!image) { + return nil; + } + if ([image.images count] > 0) { NSMutableArray *scaledImages = [NSMutableArray array];