diff options
Diffstat (limited to 'code')
-rw-r--r-- | code/qcommon/net_ip.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index d7a883a..862f91a 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -1194,7 +1194,13 @@ NET_GetLocalAddress void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *netmask) { int addrlen; - sa_family_t family = addr->sa_family; + sa_family_t family; + + // only add addresses that have all required info. + if(!addr || !netmask || !ifname) + return; + + family = addr->sa_family; if(numIP < MAX_IPS) { |