]> git.saurik.com Git - winterboard.git/commitdiff
Don't try to put corrupt PNG files into iconCache.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 27 Nov 2014 14:54:15 +0000 (06:54 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 27 Nov 2014 14:54:15 +0000 (06:54 -0800)
Library.mm

index d400f4ca74ef30058006d1352f0020a38f34d40b..43545600a4d05b2246629223780343faf04fd6a4 100644 (file)
@@ -2265,9 +2265,8 @@ MSHook(NSArray *, CPBitmapCreateImagesFromPath, NSString *path, CFTypeRef *names
         if (NSString *themed = $pathForFile$inBundle$([name stringByAppendingString:@".png"], bundle, true)) {
             if (indexes != nil)
                 index = [[indexes objectForKey:name] intValue];
-            UIImage *image($getImage$(themed));
-            CGImageRef cg([image CGImage]);
-            [copy replaceObjectAtIndex:index withObject:(id)cg];
+            if (UIImage *image = $getImage$(themed))
+                [copy replaceObjectAtIndex:index withObject:(id)[image CGImage]];
         }
 
     return images;