mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- NPE prevention in ComputerUtil.
This commit is contained in:
@@ -1437,6 +1437,7 @@ public class ComputerUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpellAbility saviorWithSubs = saviour;
|
SpellAbility saviorWithSubs = saviour;
|
||||||
|
ApiType saviorWithSubsApi = saviorWithSubs == null ? null : saviorWithSubs.getApi();
|
||||||
while (saviorWithSubs != null) {
|
while (saviorWithSubs != null) {
|
||||||
ApiType curApi = saviorWithSubs.getApi();
|
ApiType curApi = saviorWithSubs.getApi();
|
||||||
if (curApi == ApiType.Pump || curApi == ApiType.PumpAll) {
|
if (curApi == ApiType.Pump || curApi == ApiType.PumpAll) {
|
||||||
@@ -1599,8 +1600,7 @@ public class ComputerUtil {
|
|||||||
&& !topStack.hasParam("NoRegen")) || saviourApi == ApiType.ChangeZone
|
&& !topStack.hasParam("NoRegen")) || saviourApi == ApiType.ChangeZone
|
||||||
|| saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll
|
|| saviourApi == ApiType.Pump || saviourApi == ApiType.PumpAll
|
||||||
|| saviourApi == ApiType.Protection || saviourApi == null
|
|| saviourApi == ApiType.Protection || saviourApi == null
|
||||||
|| saviorWithSubs.getApi() == ApiType.Pump
|
|| saviorWithSubsApi == ApiType.Pump || saviorWithSubsApi == ApiType.PumpAll)) {
|
||||||
|| saviorWithSubs.getApi() == ApiType.PumpAll)) {
|
|
||||||
for (final Object o : objects) {
|
for (final Object o : objects) {
|
||||||
if (o instanceof Card) {
|
if (o instanceof Card) {
|
||||||
final Card c = (Card) o;
|
final Card c = (Card) o;
|
||||||
|
|||||||
Reference in New Issue
Block a user