Add null check on BlockStressValues.getProvider

This commit is contained in:
Bob Dole 2022-07-09 04:53:52 -04:00
parent d59e748c01
commit dd7f07c7eb

View file

@ -129,8 +129,9 @@ public class ItemDescription {
.addTo(list);
double capacity = BlockStressValues.getCapacity(block);
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block)
.getGeneratedRPM(block);
Couple<Integer> generatedRPM = BlockStressValues.getProvider(block) != null ?
BlockStressValues.getProvider(block).getGeneratedRPM(block)
: null;
StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.HIGH
: (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.LOW);