From b9913d4e441e632bf2ae5e8363a08e5431d5588c Mon Sep 17 00:00:00 2001 From: ArsenalNut Date: Sun, 14 Oct 2012 14:30:34 +0000 Subject: [PATCH] minor change to last NPE fix --- .../java/forge/card/spellability/SpellPermanent.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/forge/card/spellability/SpellPermanent.java b/src/main/java/forge/card/spellability/SpellPermanent.java index db1c3673457..34a02377cd9 100644 --- a/src/main/java/forge/card/spellability/SpellPermanent.java +++ b/src/main/java/forge/card/spellability/SpellPermanent.java @@ -556,7 +556,7 @@ public class SpellPermanent extends Spell { continue; } final SpellAbility exSA = re.getOverridingAbility(); - + if (exSA != null) { if (sa != null) { exSA.setActivatingPlayer(sa.getActivatingPlayer()); @@ -567,11 +567,12 @@ public class SpellPermanent extends Spell { else { throw new InvalidParameterException("Either ai or sa must be not null!"); } + + if (exSA.getActivatingPlayer() == null) { + throw new InvalidParameterException("Executing SpellAbility for Replacement Effect has no activating player"); + } } - - if (exSA.getActivatingPlayer() == null) { - throw new InvalidParameterException("Executing SpellAbility for Replacement Effect has no activating player"); - } + // ETBReplacement uses overriding abilities. // These checks only work if the Executing SpellAbility is an // Ability_Sub.