mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 05:06:39 +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);
|
initSprite(spr, imageParams.width, imageParams.height, imageParams);
|
||||||
|
|
||||||
int n = doc.size();
|
int n = doc.size();
|
||||||
|
if (n == 0) {
|
||||||
|
wsErr("No data in dayahead feed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int units = cfgobj["units"].as<int>();
|
int units = cfgobj["units"].as<int>();
|
||||||
if (units == 0) units = 1;
|
if (units == 0) units = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user