aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-02-14 14:30:54 +0100
committerGitHub <noreply@github.com>2020-02-14 14:30:54 +0100
commit2944575cbc3cd9afa6f8d64fdcb1908cf8deaf05 (patch)
tree65a0dfc51e672eea80c0d1a7944632bd06b80829 /src/libui_sdl
parentfcda1abbaa3e0702e587e886622892f52326d0fd (diff)
parent295404a5a696c158df2ddf9b9548c0a4b8c368c6 (diff)
Merge pull request #544 from i404788/master
Fix hanging UI when `null` addr
Diffstat (limited to 'src/libui_sdl')
-rw-r--r--src/libui_sdl/LAN_PCap.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libui_sdl/LAN_PCap.cpp b/src/libui_sdl/LAN_PCap.cpp
index c228f5e..44af0a3 100644
--- a/src/libui_sdl/LAN_PCap.cpp
+++ b/src/libui_sdl/LAN_PCap.cpp
@@ -262,8 +262,14 @@ bool Init(bool open_adapter)
curaddr = curaddr->ifa_next;
continue;
}
- if (!curaddr->ifa_addr) continue;
+ if (!curaddr->ifa_addr)
+ {
+ printf("Device (%s) does not have an address :/\n", curaddr->ifa_name);
+ curaddr = curaddr->ifa_next;
+ continue;
+ }
+
u16 af = curaddr->ifa_addr->sa_family;
if (af == AF_INET)
{