prevent NPE

This commit is contained in:
Anthony Calosa
2022-04-26 07:27:43 +08:00
committed by GitHub
parent a1c0f479b5
commit 6c5aa30e06

View File

@@ -1663,7 +1663,7 @@ public class ComputerUtil {
}
if (saviourApi == ApiType.PutCounter || saviourApi == ApiType.PutCounterAll) {
if (saviour != null && saviour.getParam("CounterType").equals("P1P1")) {
if (saviour != null && saviour.hasParam("CounterType") && saviour.getParam("CounterType").equals("P1P1")) {
toughness = AbilityUtils.calculateAmount(saviour.getHostCard(), saviour.getParamOrDefault("CounterNum", "1"), saviour);
} else {
return threatened;