Skip to content

Commit a8d5b3e

Browse files
author
Olivier Poitrey
committed
Fix a bug in SDImageCache making first request to disk cache to always return nil (fix SDWebImage#81)
1 parent 14b7973 commit a8d5b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDImageCache.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ - (UIImage *)imageFromKey:(NSString *)key fromDisk:(BOOL)fromDisk
245245

246246
if (!image && fromDisk)
247247
{
248-
UIImage *image = SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]]);
248+
image = SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]]);
249249
if (image)
250250
{
251251
[memCache setObject:image forKey:key];

0 commit comments

Comments
 (0)