diff --git a/libraries/WiFi/src/WiFiClient.cpp b/libraries/WiFi/src/WiFiClient.cpp index 6669ef59..5c42cc9d 100644 --- a/libraries/WiFi/src/WiFiClient.cpp +++ b/libraries/WiFi/src/WiFiClient.cpp @@ -398,6 +398,10 @@ int WiFiClient::peek() int WiFiClient::available() { + if(!_rxBuffer) + { + return 0; + } int res = _rxBuffer->available(); if(_rxBuffer->failed()) { log_e("%d", errno);