- Fixed a NPE in ComputerUtilCost, part 2.

This commit is contained in:
Agetian
2017-08-25 11:01:48 +00:00
parent 2ba53e2dab
commit ad1e17f329

View File

@@ -92,7 +92,7 @@ public class ComputerUtilCost {
// Remove X counters - set ChosenX to max possible value here, the SAs should correct that
// value later as the AI decides what to do (in checkApiLogic / checkAiLogic)
if (sa.hasSVar(remCounter.getAmount())) {
if (sa != null && sa.hasSVar(remCounter.getAmount())) {
final String sVar = sa.getSVar(remCounter.getAmount());
if (sVar.equals("XChoice")) {
sa.setSVar("ChosenX", String.valueOf(source.getCounters(type)));