Fix hanging UI when `null` addr
This commit is contained in:
parent
3f7bc1a6c1
commit
7340b1d6e3
|
@ -257,12 +257,11 @@ bool Init(bool open_adapter)
|
||||||
struct ifaddrs* curaddr = addrs;
|
struct ifaddrs* curaddr = addrs;
|
||||||
while (curaddr)
|
while (curaddr)
|
||||||
{
|
{
|
||||||
if (strcmp(curaddr->ifa_name, adata->DeviceName))
|
if (strcmp(curaddr->ifa_name, adata->DeviceName) || !curaddr->ifa_addr)
|
||||||
{
|
{
|
||||||
curaddr = curaddr->ifa_next;
|
curaddr = curaddr->ifa_next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!curaddr->ifa_addr) continue;
|
|
||||||
|
|
||||||
u16 af = curaddr->ifa_addr->sa_family;
|
u16 af = curaddr->ifa_addr->sa_family;
|
||||||
if (af == AF_INET)
|
if (af == AF_INET)
|
||||||
|
|
Loading…
Reference in New Issue