From 56d52899c8cbaf854a5fee235c14102d4a58d82c Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sun, 12 Jan 2020 08:05:26 +0400 Subject: [PATCH] fixed Relentless Pursuit (NPE errors) --- Mage.Sets/src/mage/cards/r/RelentlessPursuit.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mage.Sets/src/mage/cards/r/RelentlessPursuit.java b/Mage.Sets/src/mage/cards/r/RelentlessPursuit.java index bce1e3c1dd..534cadebd9 100644 --- a/Mage.Sets/src/mage/cards/r/RelentlessPursuit.java +++ b/Mage.Sets/src/mage/cards/r/RelentlessPursuit.java @@ -89,14 +89,18 @@ class RelentlessPursuitEffect extends OneShotEffect { if (creatureCardFound) { TargetCard target = new TargetCardInLibrary(0, 1, creatureFilter); controller.chooseTarget(Outcome.DrawCard, cards, target, source, game); - cards.remove(target.getFirstTarget()); - cardsToHand.add(target.getFirstTarget()); + if (target.getFirstTarget() != null) { + cards.remove(target.getFirstTarget()); + cardsToHand.add(target.getFirstTarget()); + } } if (landCardFound) { TargetCard target = new TargetCardInLibrary(0, 1, landFilter); controller.chooseTarget(Outcome.DrawCard, cards, target, source, game); - cards.remove(target.getFirstTarget()); - cardsToHand.add(target.getFirstTarget()); + if (target.getFirstTarget() != null) { + cards.remove(target.getFirstTarget()); + cardsToHand.add(target.getFirstTarget()); + } } controller.moveCards(cardsToHand, Zone.HAND, source, game); controller.moveCards(cards, Zone.GRAVEYARD, source, game);