diff --git a/SDWebImage/Core/SDWebImageDownloaderOperation.m b/SDWebImage/Core/SDWebImageDownloaderOperation.m index 837883e2..3c0c8abd 100644 --- a/SDWebImage/Core/SDWebImageDownloaderOperation.m +++ b/SDWebImage/Core/SDWebImageDownloaderOperation.m @@ -244,7 +244,10 @@ self.coderQueue.qualityOfService = NSQualityOfServiceDefault; } [self.dataTask resume]; - NSArray *tokens = [self.callbackTokens copy]; + NSArray *tokens; + @synchronized (self) { + tokens = [self.callbackTokens copy]; + } for (SDWebImageDownloaderOperationToken *token in tokens) { if (token.progressBlock) { token.progressBlock(0, NSURLResponseUnknownLength, self.request.URL);