Added error checking for WSAStartup()

This commit is contained in:
Gunnar Beutner 2012-05-13 20:39:51 +02:00
parent cdcac0d903
commit 38486640fd
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ Application::Application(void)
{
#ifdef _WIN32
WSADATA wsaData;
WSAStartup(MAKEWORD(1, 1), &wsaData);
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
throw Win32Exception("WSAStartup failed", WSAGetLastError());
#else /* _WIN32 */
LTDL_SET_PRELOADED_SYMBOLS();