Merge pull request #3373 from dreampiggy/fix_clang_analyze_issue
Fix the clang analyze issue
This commit is contained in:
commit
7269107908
|
@ -552,11 +552,6 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
cacheType:(SDImageCacheType)cacheType
|
||||
finished:(BOOL)finished
|
||||
completed:(nullable SDInternalCompletionBlock)completedBlock {
|
||||
// the target image store cache type
|
||||
SDImageCacheType storeCacheType = SDImageCacheTypeAll;
|
||||
if (context[SDWebImageContextStoreCacheType]) {
|
||||
storeCacheType = [context[SDWebImageContextStoreCacheType] integerValue];
|
||||
}
|
||||
id<SDImageTransformer> transformer = context[SDWebImageContextImageTransformer];
|
||||
if (![transformer conformsToProtocol:@protocol(SDImageTransformer)]) {
|
||||
transformer = nil;
|
||||
|
@ -661,7 +656,7 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
BOOL shouldThumbnailImage = context[SDWebImageContextImageThumbnailPixelSize] != nil || image.sd_decodeOptions[SDImageCoderDecodeThumbnailPixelSize] != nil;
|
||||
|
||||
// Store the transformed/thumbnail image into the cache
|
||||
if (transformed || shouldThumbnailImage) {
|
||||
if (image && (transformed || shouldThumbnailImage)) {
|
||||
NSData *cacheData;
|
||||
// pass nil if the image was transformed/thumbnailed, so we can recalculate the data from the image
|
||||
if (cacheSerializer && (storeCacheType == SDImageCacheTypeDisk || storeCacheType == SDImageCacheTypeAll)) {
|
||||
|
|
|
@ -576,6 +576,8 @@ static inline CGImageRef _Nullable SDCreateCGImageFromCIImage(CIImage * _Nonnull
|
|||
return SDGetColorFromRGBA(pixel, bitmapInfo);
|
||||
} else {
|
||||
NSLog(@"Unsupported components: %zu", components);
|
||||
CFRelease(data);
|
||||
CGImageRelease(imageRef);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue