Merge pull request #1978 from dreampiggy/fix_CFRelease_crash

Fix CFRelease on NULL if CGImageSourceRef create failed
This commit is contained in:
Bogdan Poplauschi 2017-08-02 14:45:27 +03:00 committed by GitHub
commit ff3b4ac9fd
1 changed files with 3 additions and 1 deletions

View File

@ -376,8 +376,10 @@ didReceiveResponse:(NSURLResponse *)response
}
}
if (imageSource) {
CFRelease(imageSource);
}
}
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
progressBlock(self.imageData.length, self.expectedSize, self.request.URL);