From 2940a99f8b3a280e0acc3236b31762f61757ce56 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 26 Nov 2014 01:40:44 -0800 Subject: [PATCH] Fix irritating crash in SummerBoard (why not? :/). --- Library.mm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); -- 2.45.2