diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index 9255411b..d8b56098 100644 --- a/SDWebImage/SDWebImageDownloaderOperation.m +++ b/SDWebImage/SDWebImageDownloaderOperation.m @@ -241,13 +241,11 @@ } CFRelease(imageSource); - - NSUInteger received = self.imageData.length; - - if (self.progressBlock) - { - self.progressBlock(received, self.expectedSize); - } + } + + if (self.progressBlock) + { + self.progressBlock(self.imageData.length, self.expectedSize); } }