From 6690e809fb83cb4302e4446e7d4b81992faf3009 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sat, 19 Feb 2022 09:57:27 +0100 Subject: [PATCH] Fixed reboot issue --- src/EnergyAccounting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyAccounting.cpp b/src/EnergyAccounting.cpp index 3e035fe4..28231213 100644 --- a/src/EnergyAccounting.cpp +++ b/src/EnergyAccounting.cpp @@ -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(); }