Skip to content

Commit

Permalink
Added null check for package, shows error if not installed by Cydia.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb93 committed Nov 10, 2014
1 parent 12e9290 commit 01c1f34
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions CyDelete8.xm
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,20 @@ static void removeBundleFromMIList(NSString *bundle) {

// We still don't have an entry (or a NSNull). We should probably bail out.
if(!package) return;

[uninstallQueue addOperation:[[CDUninstallDpkgOperation alloc] initWithPackage:package]];

if(package == [NSNull null]) {
NSString *nonCydiaText = [NSString stringWithFormat:CDLocalizedString(@"PACKAGE_NOT_CYDIA_BODY"), package];
UIAlertView *nonCydiaAlert = [[UIAlertView alloc] initWithTitle:CDLocalizedString(@"PACKAGE_NOT_CYDIA_TITLE")
message:nonCydiaText
delegate:nil
cancelButtonTitle:@"Okay"
otherButtonTitles:nil];
[nonCydiaAlert show];
return;
}
else {
[uninstallQueue addOperation:[[CDUninstallDpkgOperation alloc] initWithPackage:package]];
}
}
%end

Expand Down

0 comments on commit 01c1f34

Please sign in to comment.