mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix crash bug for interfaces without assigned address, thanks to PhoinixGR for reporting.
This commit is contained in:
parent
d77d3e0658
commit
1306d9760d
1 changed files with 7 additions and 1 deletions
|
@ -1194,7 +1194,13 @@ NET_GetLocalAddress
|
||||||
void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *netmask)
|
void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *netmask)
|
||||||
{
|
{
|
||||||
int addrlen;
|
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)
|
if(numIP < MAX_IPS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue