]> git.saurik.com Git - cydia.git/commitdiff
Fix the bug Optimo reported with CFBundleIconFile.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Mar 2012 20:03:47 +0000 (13:03 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Mar 2012 20:03:47 +0000 (13:03 -0700)
MobileCydia.mm

index fc38970fde4ad8ee2a5c73267a0bee15b3eb41d3..bd18af149beb6fafc4080a48e489a9351d18db93 100644 (file)
@@ -2885,7 +2885,8 @@ struct PackageNameOrdering :
 
                 NSString *bundle([file stringByDeletingLastPathComponent]);
                 NSString *icon([info objectForKey:@"CFBundleIconFile"]);
-                if (icon == nil || [icon length] == 0)
+                // XXX: maybe this should check if this is really a string, not just for length
+                if (icon == nil || ![icon respondsToSelector:@selector(length)] || [icon length] == 0)
                     icon = @"icon.png";
                 NSURL *url([NSURL fileURLWithPath:[bundle stringByAppendingPathComponent:icon]]);