From fc5d730f0ac2ece2c084015180891ff7792b74cd Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 15 Sep 2014 07:50:51 +0200 Subject: [PATCH] Fixed possible NPE of AddManaOfAnyColorEffect. --- .../mage/abilities/effects/common/AddManaOfAnyColorEffect.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java index 228a80c93e..55ff35d170 100644 --- a/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java +++ b/Mage/src/mage/abilities/effects/common/AddManaOfAnyColorEffect.java @@ -72,6 +72,9 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect { ChoiceColor choice = new ChoiceColor(false); if (controller.choose(outcome, choice, game)) { + if (choice.getColor() == null) { + return false; // it happenes, don't know how + } Mana createdMana = null; if (choice.getColor().isBlack()) { createdMana = Mana.BlackMana(amount);