mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed possible NPE of AddManaOfAnyColorEffect.
This commit is contained in:
parent
217eaa55d7
commit
fc5d730f0a
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue