mirror of
https://github.com/LX3JL/xlxd.git
synced 2025-12-06 07:42:01 +01:00
Merge pull request #206 from jimt/patch-1
fix Linux AF_INET iteration segfault
This commit is contained in:
commit
190021cc29
|
|
@ -790,7 +790,7 @@ bool CReflector::UpdateListenMac(void)
|
||||||
for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next )
|
for ( ifaptr = ifap; (ifaptr != NULL) && !found; ifaptr = (ifaptr)->ifa_next )
|
||||||
{
|
{
|
||||||
// is it an AF_INET?
|
// is it an AF_INET?
|
||||||
if ( ifaptr->ifa_addr->sa_family == AF_INET )
|
if ( ifaptr->ifa_addr && ifaptr->ifa_addr->sa_family == AF_INET )
|
||||||
{
|
{
|
||||||
if (ifaptr->ifa_addr == NULL)
|
if (ifaptr->ifa_addr == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue