Skip to content

Commit

Permalink
Fix the issue in stopPreheatingImagesForRequests
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Mar 19, 2015
1 parent 7aa6330 commit 92bf711
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DFImageManager/Source/Core/Managing/DFImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,11 @@ - (void)stopPreheatingImagesForRequests:(NSArray *)requests {
dispatch_async(_queue, ^{
for (DFImageRequest *request in [self _canonicalRequestsForRequests:requests]) {
_DFImageRequestKey *key = DFImageCacheKeyCreate(request);
[self _setImageTaskState:_DFImageTaskStateCancelled task:_preheatingTasks[key]];
[_preheatingTasks removeObjectForKey:key];
_DFImageTask *task = _preheatingTasks[key];
if (task) {
[self _setImageTaskState:_DFImageTaskStateCancelled task:task];
[_preheatingTasks removeObjectForKey:key];
}
}
});
}
Expand Down

0 comments on commit 92bf711

Please sign in to comment.