* Fixed possible NPE of PlayerImpl.

This commit is contained in:
LevelX2 2014-11-07 08:34:35 +01:00
parent 0e74ed1cfb
commit 499e4865d3

View file

@ -1744,7 +1744,7 @@ public abstract class PlayerImpl implements Player, Serializable {
int opponentsAlive = 0;
for (UUID opponentId: game.getOpponents(playerId)) {
Player opponent = game.getPlayer(opponentId);
if (!opponent.hasLost()) {
if (opponent != null && !opponent.hasLost()) {
opponentsAlive++;
}
}