When storeImage:imageData:forKey:toDisk: is called with toDisk:YES but no data, …
…do not prevent memory caching (fix: #24)
Showing
1 changed file
with
1 additions
and
5 deletions
@@ -188,15 +188,11 @@ static SDImageCache *instance; | @@ -188,15 +188,11 @@ static SDImageCache *instance; | ||
188 | return; | 188 | return; |
189 | } | 189 | } |
190 | 190 | ||
191 | - if (toDisk && !data) | ||
192 | - { | ||
193 | - return; | ||
194 | - } | ||
195 | - | ||
196 | [memCache setObject:image forKey:key]; | 191 | [memCache setObject:image forKey:key]; |
197 | 192 | ||
198 | if (toDisk) | 193 | if (toDisk) |
199 | { | 194 | { |
195 | + if (!data) return; | ||
200 | NSArray *keyWithData; | 196 | NSArray *keyWithData; |
201 | if (data) | 197 | if (data) |
202 | { | 198 | { |
-
Please register or login to post a comment