* Fixed possible game exception with empty library and commander movement (fixes #6952).

This commit is contained in:
LevelX2 2020-08-10 21:12:12 +02:00
parent 12c50420bf
commit 973c19c81f

View file

@ -998,6 +998,7 @@ public abstract class PlayerImpl implements Player, Serializable {
&& !(card instanceof PermanentToken) && !card.isCopy()) {
Card cardInLib = getLibrary().getFromTop(game);
if (cardInLib != null && cardInLib.getId().equals(card.getId())) { // check needed because e.g. commander can go to command zone
cardInLib = getLibrary().removeFromTop(game);
getLibrary().putCardToTopXPos(cardInLib, xFromTheTop, game);
game.informPlayers(cardInLib.getLogName()
+ " is put into "