From: Jay Freeman (saurik) Date: Thu, 27 Nov 2014 14:54:15 +0000 (-0800) Subject: Don't try to put corrupt PNG files into iconCache. X-Git-Tag: v0.9.3918~8 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/39f1cc1028eca283a8edccdef5389c095f6ee3b0 Don't try to put corrupt PNG files into iconCache. --- diff --git a/Library.mm b/Library.mm index d400f4c..4354560 100644 --- a/Library.mm +++ b/Library.mm @@ -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;