Explorar el Código

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 hace 11 años
padre
commit
62d356db9f
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;
 }