From: Jay Freeman (saurik) Date: Wed, 26 Nov 2014 09:40:44 +0000 (-0800) Subject: Fix irritating crash in SummerBoard (why not? :/). X-Git-Tag: v0.9.3916~4 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/2940a99f8b3a280e0acc3236b31762f61757ce56 Fix irritating crash in SummerBoard (why not? :/). --- diff --git a/Library.mm b/Library.mm index 20f9161..cc20f1d 100644 --- a/Library.mm +++ b/Library.mm @@ -433,7 +433,12 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { NSString *path = [self path]; NSString *folder = [path lastPathComponent]; NSString *dname = [self displayName]; - NSString *didentifier = [self displayIdentifier]; + + NSString *didentifier; + if ([self respondsToSelector:@selector(displayIdentifier)]) + didentifier = [self displayIdentifier]; + else + didentifier = nil; if (Debug_) NSLog(@"WB:Debug: [SBApplication(%@:%@:%@:%@) pathForIcon]", identifier, folder, dname, didentifier); @@ -450,7 +455,7 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") { if (NSString *name = Name) \ [names addObject:[NSString stringWithFormat:@"Icons%@/%@.png", suffix, name]]; - if (![didentifier isEqualToString:identifier]) + if (didentifier != nil && ![didentifier isEqualToString:identifier]) testForIcon(didentifier); testForIcon(identifier);