From f815a6177592f20fe35c0c893a68ceb8e98da5ec Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Wed, 2 Mar 2022 23:27:38 +0100 Subject: [PATCH] Fix NPE with Numa --- forge-game/src/main/java/forge/game/ability/AbilityUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index c2fd590cdd9..16dda3f86b0 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1753,7 +1753,7 @@ public class AbilityUtils { // ImmediateTrigger should check for the Ability which created the trigger if (t.getSpawningAbility() != null) { root = t.getSpawningAbility().getRootAbility(); - return doXMath(root.getXManaCostPaid(), expr, c, ctb); + return doXMath(root.getXManaCostPaid() == null ? 0 : root.getXManaCostPaid(), expr, c, ctb); } // 107.3k If an object’s enters-the-battlefield triggered ability or replacement effect refers to X,