Fixed NPE with empty library

This commit is contained in:
Oleg Agafonov 2020-01-08 18:48:41 +04:00
parent 8d45e7af4c
commit 00da778484

View file

@ -3410,7 +3410,9 @@ public abstract class PlayerImpl implements Player, Serializable {
if (player != null) {
if (/*player.isTopCardRevealed() &&*/player.getLibrary().hasCards()) {
Card card = player.getLibrary().getFromTop(game);
getPlayableFromNonHandCardAll(game, Zone.LIBRARY, card, availableMana, playable);
if (card != null) {
getPlayableFromNonHandCardAll(game, Zone.LIBRARY, card, availableMana, playable);
}
}
}
}