Explorar o código

Fix runtime exception

(cherry picked from commit 03a0766155bd1d03d5caba98da61af491740c1d3)
Felix Paul Kühne %!s(int64=9) %!d(string=hai) anos
pai
achega
d092b7ced4
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Sources/VLCThumbnailsCache.m

+ 2 - 1
Sources/VLCThumbnailsCache.m

@@ -306,7 +306,8 @@
         CGFloat centerOffset = (imagePartWidth * i + imagePartWidth / 2) - imageSize.width / 2;
         //shift the rect to draw the middle of the image in the clippingrect
         CGRect drawingRect = CGRectMake(centerOffset, 0, imageSize.width, imageSize.height);
-        [clusterThumb drawInRect:drawingRect];
+        if (clusterThumb != nil)
+            [clusterThumb drawInRect:drawingRect];
         //get rid of the old clippingRect
         CGContextRestoreGState(context);
     }