From 8221a68efef88ec196de1ac07721de1032fc99b3 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 5 Sep 2017 17:53:03 +0200 Subject: [PATCH] Minor fix for user handling. --- .../java/mage/server/tournament/TournamentSession.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java b/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java index cf4b16ee86..8819f262ec 100644 --- a/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java +++ b/Mage.Server/src/main/java/mage/server/tournament/TournamentSession.java @@ -170,9 +170,11 @@ public class TournamentSession { } private void removeTournamentForUser() { - UserManager.instance.getUser(userId).ifPresent(user - -> user.removeTournament(playerId)); - + Optional user = UserManager.instance.getUser(userId); + if (user.isPresent()) { + user.get().removeTable(playerId); + user.get().removeTournament(playerId); + } } }