don't seg if looking up the ip of hostname fails (which on a properly
configured system, shouldn't happen, but oh well)
This commit is contained in:
parent
e69c1e8918
commit
6196fda661
|
@ -133,7 +133,10 @@ UDP_Init (void)
|
|||
// determine my name & address
|
||||
gethostname (buff, MAXHOSTNAMELEN);
|
||||
local = gethostbyname (buff);
|
||||
myAddr = *(int *) local->h_addr_list[0];
|
||||
if (local)
|
||||
myAddr = *(int *) local->h_addr_list[0];
|
||||
else
|
||||
myAddr = 0;
|
||||
|
||||
// if the quake hostname isn't set, set it to the machine name
|
||||
if (strcmp (hostname->string, "UNNAMED") == 0) {
|
||||
|
|
Loading…
Reference in New Issue