From 9ade5efde0de81db6729ec9aa0ccc9458f1d7135 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 11 Aug 2014 13:57:18 +0200 Subject: [PATCH] * Fixed possible NPE in CostsImpl. --- Mage/src/mage/abilities/costs/CostsImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage/src/mage/abilities/costs/CostsImpl.java b/Mage/src/mage/abilities/costs/CostsImpl.java index 7a59ec5a50..da4c3b0de6 100644 --- a/Mage/src/mage/abilities/costs/CostsImpl.java +++ b/Mage/src/mage/abilities/costs/CostsImpl.java @@ -156,7 +156,9 @@ public class CostsImpl extends ArrayList implements Costs public Targets getTargets() { Targets targets = new Targets(); for (T cost: this) { - targets.addAll(cost.getTargets()); + if (cost.getTargets() != null) { + targets.addAll(cost.getTargets()); + } } return targets; }