Fixed reboot issue

This commit is contained in:
Gunnar Skjold 2022-02-19 09:57:27 +01:00
parent b41dd862b6
commit 6690e809fb

View File

@ -47,7 +47,7 @@ bool EnergyAccounting::update(AmsData* amsData) {
init = true;
}
if(!initPrice && eapi->getValueForHour(0) != ENTSOE_NO_VALUE) {
if(!initPrice && eapi != NULL && eapi->getValueForHour(0) != ENTSOE_NO_VALUE) {
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf("(EnergyAccounting) Initializing prices at %lu\n", now);
calcDayCost();
}