Fixed NPE

This commit is contained in:
Gunnar Skjold
2023-05-22 12:51:26 +02:00
parent a57405a7a5
commit 9d902c63de
3 changed files with 9 additions and 11 deletions

View File

@@ -577,6 +577,11 @@ bool AmsDataStorage::isHappy() {
}
bool AmsDataStorage::isDayHappy() {
if(tz == NULL) {
if(debugger->isActive(RemoteDebug::VERBOSE)) debugger->printf_P(PSTR("(AmsDataStorage) Timezone is missing\n"));
return false;
}
time_t now = time(nullptr);
if(now < FirmwareVersion::BuildEpoch) return false;