diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index bda674d..bfea21c 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4004,13 +4004,15 @@ static NSString *Warning_; } - (NSArray *) getInstalledPackages { - NSArray *packages([[Database sharedInstance] packages]); + Database *database([Database sharedInstance]); +@synchronized (database) { + NSArray *packages([database packages]); NSMutableArray *installed([NSMutableArray arrayWithCapacity:1024]); for (Package *package in packages) - if ([package installed] != nil) + if (![package uninstalled]) [installed addObject:package]; return installed; -} +} } - (Package *) getPackageById:(NSString *)id { Package *package([[Database sharedInstance] packageWithName:id]); |