mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
fNull pointer call from WiFiClient::localIP() to IPAddress (#7221)
Fixes exception 28 in IPAddress(const ipv4_addr* fw_addr); with null ip_addr pointer passed in by WiFiCient.cpp localIP(). I assumed that localIP() was called shortly after _pcb became null.
This commit is contained in:
parent
9632e868d5
commit
503988132d
@ -367,7 +367,7 @@ uint16_t WiFiClient::remotePort()
|
||||
|
||||
IPAddress WiFiClient::localIP()
|
||||
{
|
||||
if (!_client)
|
||||
if (!_client || !_client->getLocalAddress())
|
||||
return IPAddress(0U);
|
||||
|
||||
return IPAddress(_client->getLocalAddress());
|
||||
|
Loading…
x
Reference in New Issue
Block a user