diff options
author | i404788 <50617709+i404788@users.noreply.github.com> | 2019-11-19 22:19:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 22:19:30 +0000 |
commit | 7e07250652260657b0a78d66c556d6edc1175b27 (patch) | |
tree | 88066fe45437e5551beb344ed1f4083adf3f3265 /src | |
parent | 7340b1d6e3c9de607608a786b839001500a3348b (diff) |
Maybe better to log
Diffstat (limited to 'src')
-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) { |