瀏覽代碼

fix runtime exception

Felix Paul Kühne 10 年之前
父節點
當前提交
63a8b0e019
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Sources/VLCLocalPlexFolderListViewController.m

+ 2 - 1
Sources/VLCLocalPlexFolderListViewController.m

@@ -248,7 +248,8 @@
         NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:url]];
         if (imageData) {
             image = [[UIImage alloc] initWithData:imageData];
-            [_imageCache setObject:image forKey:url];
+            if (image)
+                [_imageCache setObject:image forKey:url];
         }
         return image;
     }