mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
* Fixed possible NPE of PlayerImpl.
This commit is contained in:
parent
0e74ed1cfb
commit
499e4865d3
1 changed files with 1 additions and 1 deletions
|
|
@ -1744,7 +1744,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
int opponentsAlive = 0;
|
int opponentsAlive = 0;
|
||||||
for (UUID opponentId: game.getOpponents(playerId)) {
|
for (UUID opponentId: game.getOpponents(playerId)) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (!opponent.hasLost()) {
|
if (opponent != null && !opponent.hasLost()) {
|
||||||
opponentsAlive++;
|
opponentsAlive++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue