diff --git a/Sources/Engine/GameAgent/GameAgent.cpp b/Sources/Engine/GameAgent/GameAgent.cpp index ec648e0..d90b835 100644 --- a/Sources/Engine/GameAgent/GameAgent.cpp +++ b/Sources/Engine/GameAgent/GameAgent.cpp @@ -163,6 +163,14 @@ void _initializeWinsock(void) return; } + // start WSA + if(WSAStartup(MAKEWORD(2, 2), _wsaData) != 0) { + CPrintF("Error initializing winsock!\n"); + _uninitWinsock(); + return; + } +#endif + _wsaData = new WSADATA; _socket = INVALID_SOCKET; @@ -172,14 +180,6 @@ void _initializeWinsock(void) } _szBuffer = new char[2050]; - // start WSA - if(WSAStartup(MAKEWORD(2, 2), _wsaData) != 0) { - CPrintF("Error initializing winsock!\n"); - _uninitWinsock(); - return; - } -#endif - // get the host IP hostent* phe; if(!ga_bMSLegacy) {