Bug fix: delete offline account causes error

This commit is contained in:
Duy Tran Khanh 2021-01-17 09:26:41 +07:00
parent db0f1d39db
commit 1954f9633e
2 changed files with 5 additions and 1 deletions

View file

@ -24,6 +24,10 @@ public class InvalidateTokenTask extends AsyncTask<String, Void, Throwable> {
public Throwable doInBackground(String... args) {
path = args[0];
try {
if (profilePath.accessToken.equals("0")) {
return null;
}
this.profilePath = MinecraftAccount.load(args[0]);
this.authenticator.invalidate(profilePath.accessToken,
UUID.fromString(profilePath.isMicrosoft ? profilePath.profileId : profilePath.clientToken /* should be? */));