Преглед на файлове

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 години
родител
ревизия
62d356db9f
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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;
 }