Merge pull request #9996 from Staars/HM10

HM10: do not crash with zero sensors
This commit is contained in:
Theo Arends 2020-11-27 18:28:22 +01:00 committed by GitHub
commit b56109d34e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;