Merge pull request #3610 from Aestek/fix/netplay-ifaddr-segfault
Fix: segfault in NetPlayServer::GetInterfaceListInternal for ifa_addr-less interfaces
This commit is contained in:
commit
32dcb4c37c
|
@ -828,6 +828,9 @@ std::vector<std::pair<std::string, std::string>> NetPlayServer::GetInterfaceList
|
|||
for (ifaddrs* curifp = ifp; curifp; curifp = curifp->ifa_next)
|
||||
{
|
||||
sockaddr* sa = curifp->ifa_addr;
|
||||
|
||||
if (sa == nullptr)
|
||||
continue;
|
||||
if (sa->sa_family != AF_INET)
|
||||
continue;
|
||||
sockaddr_in* sai = (struct sockaddr_in*) sa;
|
||||
|
|
Loading…
Reference in New Issue