git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3294
d7cf8633-e32d-0410-b094-
e92efae38249
{
int i, a = LHNETADDRESS_GetAddressType(address);
for (i = 0;i < cl_numsockets;i++)
- if (LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])) == a)
+ if (cl_sockets[i] && LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(cl_sockets[i])) == a)
return cl_sockets[i];
return NULL;
}
{
int i, a = LHNETADDRESS_GetAddressType(address);
for (i = 0;i < sv_numsockets;i++)
- if (LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(sv_sockets[i])) == a)
+ if (sv_sockets[i] && LHNETADDRESS_GetAddressType(LHNET_AddressFromSocket(sv_sockets[i])) == a)
return sv_sockets[i];
return NULL;
}