mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix two null issues
This commit is contained in:
parent
07522a7d8f
commit
517a69e891
2 changed files with 5 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -105,6 +105,10 @@ public class PendingMicrosoftAuthentication {
|
|||
}
|
||||
|
||||
public void resetRunningFlow() {
|
||||
if (authentication == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Interrupt the current flow
|
||||
this.authentication.cancel(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue