mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
Fixed crash on attempt to send stats without network connection
https://forum.zdoom.org/viewtopic.php?t=59844
This commit is contained in:
parent
b4d3715345
commit
ecff13ac2e
1 changed files with 5 additions and 0 deletions
|
@ -57,6 +57,11 @@ bool I_HTTPRequest(const char* request)
|
|||
SOCKET Socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
struct hostent *host;
|
||||
host = gethostbyname(sys_statshost.GetHumanString());
|
||||
if (host == nullptr)
|
||||
{
|
||||
DPrintf(DMSG_ERROR, "Error looking up hostname.\n");
|
||||
return false;
|
||||
}
|
||||
SOCKADDR_IN SockAddr;
|
||||
SockAddr.sin_port = htons(sys_statsport);
|
||||
SockAddr.sin_family = AF_INET;
|
||||
|
|
Loading…
Reference in a new issue