Add guard to handle to check for _initialized (#1321)

The wifi stack initialisation must be complete before calling  `_udp_ota.parsePacket()` otherwise you just get a screen filled with 
```
```
and due to the more async methods in ESP32 `handle()` may be called before this can occur.
This commit is contained in:
sticilface 2018-04-16 17:56:58 +01:00 committed by Me No Dev
parent c92b617397
commit 1424b6d1a4

View File

@ -370,6 +370,9 @@ void ArduinoOTAClass::end() {
}
void ArduinoOTAClass::handle() {
if (!_initialized) {
return;
}
if (_state == OTA_RUNUPDATE) {
_runUpdate();
_state = OTA_IDLE;