From 64adbf4b2181ec52de26f7d4a9705d37e10ace82 Mon Sep 17 00:00:00 2001 From: "maurer.it" Date: Wed, 19 Oct 2011 18:51:31 -0400 Subject: [PATCH] [FIX] Fixes issue 289. --- Mage/src/mage/target/common/TargetDefender.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/target/common/TargetDefender.java b/Mage/src/mage/target/common/TargetDefender.java index d0481c6d0e..36c55e6732 100644 --- a/Mage/src/mage/target/common/TargetDefender.java +++ b/Mage/src/mage/target/common/TargetDefender.java @@ -195,7 +195,12 @@ public class TargetDefender extends TargetImpl { } Permanent permanent = game.getPermanent(id); if (permanent != null) { - return permanent.canBeTargetedBy(targetSource, source.getControllerId(), game) && filter.match(permanent); + //Could be targeting due to combat decision to attack a player or planeswalker. + UUID controllerId = null; + if ( source != null ) { + controllerId = source.getControllerId(); + } + return permanent.canBeTargetedBy(targetSource, controllerId, game) && filter.match(permanent); } return false; }