Merge pull request #544 from i404788/master

Fix hanging UI when `null` addr
This commit is contained in:
Arisotura 2020-02-14 14:30:54 +01:00 committed by GitHub
commit 2944575cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -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)
{