From 017d2cfd9c0833defab278c3446576465e928b56 Mon Sep 17 00:00:00 2001 From: Sloth Date: Fri, 14 Oct 2011 20:48:04 +0000 Subject: [PATCH] - Fixed a possible NPE in doDiscard. --- src/main/java/forge/Player.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forge/Player.java b/src/main/java/forge/Player.java index b39306cae4d..3089c5c0fc7 100644 --- a/src/main/java/forge/Player.java +++ b/src/main/java/forge/Player.java @@ -1035,7 +1035,7 @@ public abstract class Player extends GameEntity { if ((c.hasKeyword("If a spell or ability an opponent controls causes you to discard CARDNAME, put it onto the battlefield instead of putting it into your graveyard.") || c.hasKeyword("If a spell or ability an opponent controls causes you to discard CARDNAME, put it onto the battlefield with two +1/+1 counters on it instead of putting it into your graveyard.")) - && !c.getController().equals(sa.getSourceCard().getController())) { + && null != sa && !c.getController().equals(sa.getSourceCard().getController())) { AllZone.getGameAction().discard_PutIntoPlayInstead(c); } else if (c.hasKeyword("If a spell or ability an opponent controls causes you to discard CARDNAME, return it to your hand.")) { ;