From f0bdd6e744bd28e151cd35542a6a024497884fd8 Mon Sep 17 00:00:00 2001 From: jeffwadsworth <> Date: Wed, 5 Dec 2012 14:46:54 -0600 Subject: [PATCH] - Added some null checks. --- .../predicate/mageobject/NumberOfTargetsPredicate.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java b/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java index e98bb41793..e9c29ab8b0 100644 --- a/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java +++ b/Mage/src/mage/filter/predicate/mageobject/NumberOfTargetsPredicate.java @@ -48,9 +48,13 @@ public class NumberOfTargetsPredicate implements Predicate { @Override public boolean apply(MageObject input, Game game) { Spell spell = game.getStack().getSpell(input.getId()); - Targets target = spell.getSpellAbility().getTargets(); - if (target.size() == targets) { - return true; + if (spell != null) { + Targets target = spell.getSpellAbility().getTargets(); + if (target != null) { + if (target.size() == targets) { + return true; + } + } } return false; }