diff options
author | i404788 <50617709+i404788@users.noreply.github.com> | 2019-11-19 21:37:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 21:37:47 +0000 |
commit | 7340b1d6e3c9de607608a786b839001500a3348b (patch) | |
tree | 887a0536b4d5168402f45f1592df014d2b0bf825 /src | |
parent | 3f7bc1a6c19dc502bfe00f26d0720961cf130363 (diff) |
Fix hanging UI when `null` addr
Diffstat (limited to 'src')
-rw-r--r-- | src/libui_sdl/LAN_PCap.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libui_sdl/LAN_PCap.cpp b/src/libui_sdl/LAN_PCap.cpp index c228f5e..55b0891 100644 --- a/src/libui_sdl/LAN_PCap.cpp +++ b/src/libui_sdl/LAN_PCap.cpp @@ -257,12 +257,11 @@ bool Init(bool open_adapter) struct ifaddrs* curaddr = addrs; while (curaddr) { - if (strcmp(curaddr->ifa_name, adata->DeviceName)) + if (strcmp(curaddr->ifa_name, adata->DeviceName) || !curaddr->ifa_addr) { curaddr = curaddr->ifa_next; continue; } - if (!curaddr->ifa_addr) continue; u16 af = curaddr->ifa_addr->sa_family; if (af == AF_INET) |