Merge branch 'npe' into 'master'

Fix NPE with Numa

See merge request core-developers/forge!6331
This commit is contained in:
Anthony Calosa
2022-03-02 22:33:23 +00:00

View File

@@ -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 objects enters-the-battlefield triggered ability or replacement effect refers to X,