diff options
Diffstat (limited to 'src/libui_sdl')
-rw-r--r-- | src/libui_sdl/LAN_PCap.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libui_sdl/LAN_PCap.cpp b/src/libui_sdl/LAN_PCap.cpp index 55b0891..0682e61 100644 --- a/src/libui_sdl/LAN_PCap.cpp +++ b/src/libui_sdl/LAN_PCap.cpp @@ -257,12 +257,18 @@ bool Init(bool open_adapter) struct ifaddrs* curaddr = addrs; while (curaddr) { - if (strcmp(curaddr->ifa_name, adata->DeviceName) || !curaddr->ifa_addr) + if (strcmp(curaddr->ifa_name, adata->DeviceName) { curaddr = curaddr->ifa_next; continue; } + if (!curaddr->ifa_addr){ + printf("Device does not have an address :/"); + curaddr = curaddr->ifa_next; + continue; + } + u16 af = curaddr->ifa_addr->sa_family; if (af == AF_INET) { |