diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 5ca96b1..d5da484 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -182,21 +182,24 @@ if (configLocked) debugSerial<child; -while (items && item) - { - if (item->type == aJson_Array && aJson.getArraySize(item)>0) + while (item) { if (item->type == aJson_Array && aJson.getArraySize(item)>0) { - Item it(item->name); - if (it.isValid()) it.Stop(); - yield(); + if (item->type == aJson_Array && aJson.getArraySize(item)>0) + { + Item it(item->name); + if (it.isValid()) it.Stop(); + yield(); + } + item = item->next; } - item = item->next; - } -} + } +} pollingItem = NULL; debugSerial<