NullPointerException fixed on InteractionGameGate

This commit is contained in:
Beny 2019-05-12 05:12:27 +01:00
parent b0473e89c9
commit 54cf0b1109

View File

@ -46,7 +46,12 @@ public abstract class InteractionGameGate extends InteractionGameTeamItem
}
public void updateState(Game game, int maxPlayers) {
int memberCount = game.getTeam(this.teamColor).getMembers().size();
int memberCount = 0;
if(game.getTeam(this.teamColor) != null) {
memberCount = game.getTeam(this.teamColor).getMembers().size();
}
if(memberCount > maxPlayers) {
memberCount = maxPlayers;
}