diff options
-rw-r--r-- | MobileCydia.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index b73ed67..83215cf 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4194,9 +4194,11 @@ static NSString *Warning_; } } - (Package *) getPackageById:(NSString *)id { - Package *package([[Database sharedInstance] packageWithName:id]); - [package parse]; - return package; + if (Package *package = [[Database sharedInstance] packageWithName:id]) { + [package parse]; + return package; + } else + return (Package *) [NSNull null]; } - (NSArray *) statfs:(NSString *)path { |