- Fixed NPE in reveal function.

This commit is contained in:
Sloth
2013-06-30 08:20:10 +00:00
parent 10aadd4e66
commit f35d57b534

View File

@@ -1410,7 +1410,10 @@ public class GameAction {
}
public void reveal(List<Card> cards, Player cardOwner, boolean dontRevealToOwner) {
ZoneType zt = cards.isEmpty() ? ZoneType.Hand : game.getZoneOf(cards.get(0)).getZoneType();
ZoneType zt = ZoneType.Hand;
if (!cards.isEmpty() && game.getZoneOf(cards.get(0)) != null) {
zt = game.getZoneOf(cards.get(0)).getZoneType();
}
reveal(cardOwner + " reveals card from " + zt, cards, zt, cardOwner, dontRevealToOwner);
}