mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
Fix a segfault when no interfaces are available.
This commit is contained in:
parent
0ce32a793e
commit
beb0b9e0fc
1 changed files with 2 additions and 1 deletions
|
@ -590,7 +590,8 @@ UDP_GetSocketAddr (int socket, netadr_t *na)
|
|||
SockadrToNetadr (&addr, na);
|
||||
memcpy (&a, na->ip, ADDR_SIZE);
|
||||
if (a == 0 || a == inet_addr ("127.0.0.1")) {
|
||||
memcpy (na->ip, default_iface, ADDR_SIZE);
|
||||
if (default_iface)
|
||||
memcpy (na->ip, default_iface, ADDR_SIZE);
|
||||
if (last_iface)
|
||||
memcpy (na->ip, last_iface, ADDR_SIZE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue