Fixed possible null pointer exception.

This commit is contained in:
LevelX2 2015-09-21 16:26:00 +02:00
parent 95e626752b
commit 6249e21ff3

View file

@ -2927,7 +2927,7 @@ public abstract class PlayerImpl implements Player, Serializable {
Set<Card> cardList = new HashSet<>();
for (UUID cardId : cards) {
fromZone = game.getState().getZone(cardId);
if (fromZone.equals(Zone.BATTLEFIELD)) {
if (Zone.BATTLEFIELD.equals(fromZone)) {
Permanent permanent = game.getPermanent(cardId);
if (permanent != null) {
cardList.add(permanent);