* Fixed possible null pointer exception.

This commit is contained in:
LevelX2 2020-08-24 16:50:29 +02:00
parent 234fabb81e
commit dc45aaf02c

View file

@ -353,10 +353,10 @@ public abstract class PlayerImpl implements Player, Serializable {
this.clearCastSourceIdManaCosts();
this.castSourceIdWithAlternateMana.addAll(player.getCastSourceIdWithAlternateMana());
for (Entry<UUID, ManaCosts<ManaCost>> entry : player.getCastSourceIdManaCosts().entrySet()) {
this.castSourceIdManaCosts.put(entry.getKey(), entry.getValue().copy());
this.castSourceIdManaCosts.put(entry.getKey(), (entry.getValue() == null ? null : entry.getValue().copy()));
}
for (Entry<UUID, Costs<Cost>> entry : player.getCastSourceIdCosts().entrySet()) {
this.castSourceIdCosts.put(entry.getKey(), entry.getValue().copy());
this.castSourceIdCosts.put(entry.getKey(), (entry.getValue() == null ? null : entry.getValue().copy()));
}
this.phyrexianColors = player.getPhyrexianColors() != null ? player.getPhyrexianColors().copy() : null;