Explorar el Código

fix runtime exception

Felix Paul Kühne hace 10 años
padre
commit
63a8b0e019
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;
     }