Selaa lähdekoodia

fix runtime exception

Felix Paul Kühne 10 vuotta sitten
vanhempi
commit
63a8b0e019
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  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;
     }