From a490f9e468ec4ea7fdd042772d72f6b250449335 Mon Sep 17 00:00:00 2001 From: Danny Plenge Date: Tue, 20 Mar 2018 11:58:10 +0100 Subject: [PATCH] Refactored method in GilderBairn to not always return the same value. --- Mage.Sets/src/mage/cards/g/GilderBairn.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GilderBairn.java b/Mage.Sets/src/mage/cards/g/GilderBairn.java index 1ce8089546..7f71ffd626 100644 --- a/Mage.Sets/src/mage/cards/g/GilderBairn.java +++ b/Mage.Sets/src/mage/cards/g/GilderBairn.java @@ -95,12 +95,11 @@ class GilderBairnEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Permanent target = game.getPermanent(source.getFirstTarget()); - if (target == null) { - return false; - } - for (Counter counter : target.getCounters(game).values()) { - Counter newCounter = new Counter(counter.getName(), counter.getCount()); - target.addCounters(newCounter, source, game); + if (target != null) { + for (Counter counter : target.getCounters(game).values()) { + Counter newCounter = new Counter(counter.getName(), counter.getCount()); + target.addCounters(newCounter, source, game); + } } return false; }