Fix two null issues

This commit is contained in:
AlexProgrammerDE 2024-07-01 15:42:28 +02:00
parent 07522a7d8f
commit 517a69e891
2 changed files with 5 additions and 1 deletions

View file

@ -766,7 +766,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
final PendingMicrosoftAuthentication.AuthenticationTask task = geyser.getPendingMicrosoftAuthentication().getOrCreateTask(
getAuthData().xuid()
);
if (task.getAuthentication().isDone()) {
if (task.getAuthentication() != null && task.getAuthentication().isDone()) {
onMicrosoftLoginComplete(task);
} else {
task.resetRunningFlow();

View file

@ -105,6 +105,10 @@ public class PendingMicrosoftAuthentication {
}
public void resetRunningFlow() {
if (authentication == null) {
return;
}
// Interrupt the current flow
this.authentication.cancel(true);
}