Fix pointer check/access in Sys_InitNetworking()

Reported by scaronni.
Fixes #25.
This commit is contained in:
dhewg 2012-07-17 18:25:06 +02:00
parent 020d1daf92
commit a96635219c

View file

@ -284,15 +284,15 @@ void Sys_InitNetworking(void)
} }
for( ifp = ifap; ifp; ifp = ifp->ifa_next ) { for( ifp = ifap; ifp; ifp = ifp->ifa_next ) {
if ( !ifp->ifa_addr )
continue;
if ( ifp->ifa_addr->sa_family != AF_INET ) if ( ifp->ifa_addr->sa_family != AF_INET )
continue; continue;
if ( !( ifp->ifa_flags & IFF_UP ) ) if ( !( ifp->ifa_flags & IFF_UP ) )
continue; continue;
if ( !ifp->ifa_addr )
continue;
if ( !ifp->ifa_netmask ) if ( !ifp->ifa_netmask )
continue; continue;