소스 검색

Fix runtime exception

(cherry picked from commit 03a0766155bd1d03d5caba98da61af491740c1d3)
Felix Paul Kühne 9 년 전
부모
커밋
d092b7ced4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);
     }