- Prevent NPE when the spell is countered.

This commit is contained in:
swordshine
2014-02-17 04:33:58 +00:00
parent 8cbab3a5a7
commit 83a1b4f35e

View File

@@ -69,7 +69,7 @@ public class ControlSpellEffect extends SpellAbilityEffect {
GameObject obj = Iterables.getFirst(getDefinedOrTargeted(sa, "DefinedExchange"), null); GameObject obj = Iterables.getFirst(getDefinedOrTargeted(sa, "DefinedExchange"), null);
if (obj instanceof Card) { if (obj instanceof Card) {
Card c = (Card)obj; Card c = (Card)obj;
if (!(c.isInZone(ZoneType.Battlefield))) { if (!(c.isInZone(ZoneType.Battlefield)) || si == null) {
// Exchanging object isn't available, continue // Exchanging object isn't available, continue
continue; continue;
} }