Fixed wiki crash

This commit is contained in:
Anuken
2026-09-06 12:23:14 -04:00
parent bf3d400ca5
commit 1f6c9eac65
@@ -91,7 +91,7 @@ public class NuclearReactor extends PowerGenerator{
if(hasItems){
stats.add(Stat.productionTime, itemDuration / 60f, StatUnit.seconds);
}
if(heatOutput > 0f && (ui.planet.isShown() ? ui.planet.state.planet : state.isGame() ? state.getPlanet() : null) == Planets.erekir){
if(heatOutput > 0f && (ui != null && (ui.planet.isShown() ? ui.planet.state.planet : state.isGame() ? state.getPlanet() : null) == Planets.erekir)){
stats.add(Stat.output, table -> {
//using StatUnit.localized() strips the icon
String unit = "[red]" + Iconc.waves + "[] " + Strings.fixed(heatOutput, 0) + " " + Core.bundle.get("unit.heatunitsperside");