mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 13:40:56 +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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue