mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 03:04:25 +01:00
fixes crash when dayahead data is unavailable
This commit is contained in:
@@ -1613,6 +1613,10 @@ bool getDayAheadFeed(String &filename, JsonObject &cfgobj, tagRecord *&taginfo,
|
||||
initSprite(spr, imageParams.width, imageParams.height, imageParams);
|
||||
|
||||
int n = doc.size();
|
||||
if (n == 0) {
|
||||
wsErr("No data in dayahead feed");
|
||||
return false;
|
||||
}
|
||||
|
||||
int units = cfgobj["units"].as<int>();
|
||||
if (units == 0) units = 1;
|
||||
|
||||
Reference in New Issue
Block a user