Skip to content

energy: Fix null harvester issue in EnergySource

This MR fixes an issue in which the calculated total current becomes a NaN (See EnergySource::CalculateTotalCurrent). This is caused by the pointer to EnergyHarvester which becomes invalid when no harvesters are installed into the EnergySource. A simple check of whether or not EnergyHarvesters are associated with the EnergySource fixes this issue.

Merge request reports