Fixing race condition in UIImageView category with cached images. Thanks @iwat (Chaiwat S.)

This commit is contained in:
Mattt Thompson 2011-10-11 17:07:27 -05:00
parent e7f799484a
commit e9855af89d

View file

@ -92,6 +92,7 @@ static char kAFImageRequestOperationObjectKey;
UIImage *cachedImage = [[AFImageCache sharedImageCache] cachedImageForURL:[urlRequest URL] cacheName:nil];
if (cachedImage) {
self.image = cachedImage;
self.af_imageRequestOperation = nil;
if (success) {
success(nil, nil, cachedImage);