fixed issue 13

This commit is contained in:
BetaSteward 2010-12-13 23:45:16 -05:00
parent 83074c9b1a
commit 10cdf10da6

View file

@ -55,8 +55,13 @@ public class DiscardSourceCost extends CostImpl<DiscardSourceCost> {
@Override
public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
Player player = game.getPlayer(controllerId);
Card card = player.getHand().get(sourceId, game);
return player.discard(card, null, game);
if (player != null) {
Card card = player.getHand().get(sourceId, game);
if (card != null) {
paid = player.discard(card, null, game);
}
}
return paid;
}
@Override