Merge branch 'NPEfix' into 'master'

Fix NPE with Realmwalker

See merge request core-developers/forge!6228
This commit is contained in:
Michael Kamensky
2022-02-14 09:42:02 +00:00
2 changed files with 1 additions and 2 deletions

View File

@@ -1853,7 +1853,7 @@ public class AbilityUtils {
// Count$TriggeredManaSpent
if (sq[0].equals("TriggeredManaSpent")) {
final SpellAbility root = (SpellAbility) sa.getRootAbility().getTriggeringObject(AbilityKey.SpellAbility);
return root.getTotalManaSpent();
return root == null ? 0 : root.getTotalManaSpent();
}
// Count$Adamant.<Color>.<True>.<False>

View File

@@ -1278,7 +1278,6 @@ public class PlayerControllerHuman extends PlayerController implements IGameCont
// TODO JAVA 8 use getOrDefault
for (Card c : player.getAllCards()) {
// Changeling are all creature types, they are not interesting for
// counting creature types
if (c.hasStartOfKeyword(Keyword.CHANGELING.toString())) {