From 7839bd89cb037bf652dda463855d2a36b377757e Mon Sep 17 00:00:00 2001 From: Quercitron Date: Thu, 26 Nov 2015 01:44:19 +0300 Subject: [PATCH] * Konda's Banner - Fix NullPointerException when equipped creature is destroyed --- .../mage/sets/championsofkamigawa/KondasBanner.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java b/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java index 14109095917..ede835d57b0 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/KondasBanner.java @@ -154,14 +154,16 @@ class KondasBannerColorBoostEffect extends BoostAllEffect { Permanent equipment = game.getPermanent(source.getSourceId()); if (equipment != null && equipment.getAttachedTo() != null) { Permanent equipedCreature = game.getPermanent(equipment.getAttachedTo()); - for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { - if (equipedCreature.getColor(game).shares(perm.getColor(game))) { - perm.addPower(power.calculate(game, source, this)); - perm.addToughness(toughness.calculate(game, source, this)); + if (equipedCreature != null) { + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { + if (equipedCreature.getColor(game).shares(perm.getColor(game))) { + perm.addPower(power.calculate(game, source, this)); + perm.addToughness(toughness.calculate(game, source, this)); + } } + return true; } - return true; } return false; }