do not crash with zero sensors

This commit is contained in:
Staars 2020-11-27 17:39:06 +01:00
parent f53ac70013
commit 26dcf91531
1 changed files with 4 additions and 0 deletions

View File

@ -1520,6 +1520,10 @@ void HM10EverySecond(bool restart){
}
if(_counter==0) {
if(MIBLEsensors.size() == 0){
_counter++;
return;
}
HM10.state.sensor = _nextSensorSlot;
_nextSensorSlot++;
HM10.mode.pending_task = 1;