mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
WiFiUDP: fix crash when calling destinationIP with no packet available (#4036)
Fixes https://github.com/esp8266/Arduino/issues/3989.
This commit is contained in:
parent
db1cfc7772
commit
7fc23c6f7a
@ -163,6 +163,9 @@ public:
|
||||
|
||||
uint32_t getDestAddress()
|
||||
{
|
||||
if (!_rx_buf)
|
||||
return 0;
|
||||
|
||||
ip_hdr* iphdr = GET_IP_HDR(_rx_buf);
|
||||
return iphdr->dest.addr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user