From 20293a4d794bf10af19f93a5812ae691ac5df18b Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Tue, 15 Jan 2019 06:32:13 +0400 Subject: [PATCH] Trostani, Selesnya's Voice - fixed NPE error with AI --- Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java index 5d1a729b30..d6ff2a36a3 100644 --- a/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java +++ b/Mage.Sets/src/mage/cards/t/TrostaniSelesnyasVoice.java @@ -77,7 +77,8 @@ class TrostaniSelesnyasVoiceTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { Permanent permanent = game.getPermanent(event.getTargetId()); - if (permanent.isCreature() + if (permanent != null + && permanent.isCreature() && permanent.isControlledBy(this.controllerId) && !Objects.equals(event.getTargetId(), this.getSourceId())) { Effect effect = this.getEffects().get(0);