Browse Source

Thumbnail Cache: fix exception as NSCache doesn't like to store inexistant objects which can occur if libvlc didn't finish providing thumbnails yet

Felix Paul Kühne 11 years ago
parent
commit
62d356db9f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      AspenProject/VLCThumbnailsCache.m

+ 2 - 1
AspenProject/VLCThumbnailsCache.m

@@ -39,7 +39,8 @@ static NSCache *_thumbnailCache;
         return displayedImage;
 
     displayedImage = mediaFile.computedThumbnail;
-    [_thumbnailCache setObject:displayedImage forKey:objID];
+    if (displayedImage)
+        [_thumbnailCache setObject:displayedImage forKey:objID];
 
     return displayedImage;
 }