1
0
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:
Ivan Grokhotkov 2017-12-28 03:15:11 +01:00 committed by Develo
parent db1cfc7772
commit 7fc23c6f7a

View File

@ -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;
}