diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2015-07-03 16:55:04 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2015-07-03 16:55:04 -0700 |
commit | 75d2e4264fb9c7ccb9e90d91a71f14bf5ca67b66 (patch) | |
tree | a0b2bf6d9a19ba29dab5545d73acb036cfccae6e | |
parent | 8665efd4cdd398781eee0fb482b45aa51aea4297 (diff) |
Packages with corrupt Info.plist throw exceptions.
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index bd5ef59..5528311 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -3166,8 +3166,10 @@ struct PackageNameOrdering : for (NSString *file in files) if (application_r(file)) { NSDictionary *info([NSDictionary dictionaryWithContentsOfFile:file]); + if (info == nil) + continue; NSString *id([info objectForKey:@"CFBundleIdentifier"]); - if ([id isEqualToString:me]) + if (id == nil || [id isEqualToString:me]) continue; NSString *display([info objectForKey:@"CFBundleDisplayName"]); @@ -9538,7 +9540,7 @@ _end controller = [[[SectionController alloc] initWithDatabase:database_ source:nil section:argument] autorelease]; } - if (!external && [base isEqualToString:@"sources"]) { + if ([base isEqualToString:@"sources"]) { if ([argument isEqualToString:@"add"]) { controller = [[[SourcesController alloc] initWithDatabase:database_] autorelease]; [(SourcesController *)controller showAddSourcePrompt]; |