Fixing some possible NPE after player left tournamen/match and submits the construct/sideborading panel.

This commit is contained in:
LevelX2 2013-09-28 11:56:15 +02:00
parent b63f375da7
commit a9415db2e5

View file

@ -223,13 +223,13 @@ public class TableController {
UUID playerId = userPlayerMap.get(userId);
if (table.isTournament()) {
TournamentPlayer player = tournament.getPlayer(playerId);
if (player.hasQuit()) {
if (player == null || player.hasQuit()) {
return true; // so the construct panel closes after submit
}
} else {
if (table.getMatch() != null) {
MatchPlayer mPlayer = table.getMatch().getPlayer(playerId);
if (mPlayer.hasQuit()) {
if (mPlayer == null || mPlayer.hasQuit()) {
return true; // so the construct panel closes after submit
}
}