|
@@ -109,13 +109,16 @@ SD_LOCK_DECLARE_STATIC(_providerFramePoolMapLock);
|
|
|
|
|
|
|
|
if (self.fetchQueue.operationCount == 0) {
|
|
if (self.fetchQueue.operationCount == 0) {
|
|
|
// Prefetch next frame in background queue
|
|
// Prefetch next frame in background queue
|
|
|
- id<SDAnimatedImageProvider> animatedProvider = self.provider;
|
|
|
|
|
@weakify(self);
|
|
@weakify(self);
|
|
|
NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
|
|
NSOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
|
|
|
@strongify(self);
|
|
@strongify(self);
|
|
|
if (!self) {
|
|
if (!self) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ id<SDAnimatedImageProvider> animatedProvider = self.provider;
|
|
|
|
|
+ if (!animatedProvider) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
UIImage *frame = [animatedProvider animatedImageFrameAtIndex:index];
|
|
UIImage *frame = [animatedProvider animatedImageFrameAtIndex:index];
|
|
|
|
|
|
|
|
[self setFrame:frame atIndex:index];
|
|
[self setFrame:frame atIndex:index];
|