]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/sockmsw.cpp
wxSplitterWindow mouse capture improvements and cleanup.
[wxWidgets.git] / src / msw / sockmsw.cpp
index ebabf7d085851d2cc99b3e4fd69e1f7f964d4860..96b354fa3056c0778fde03ffcf5cfa195bfcb27b 100644 (file)
@@ -211,9 +211,9 @@ bool wxSocketMSWManager::OnInit()
   // dependencies on it for all the application using wx even if they don't use
   // sockets
 #ifdef __WXWINCE__
-    #define WINSOCK_DLL_NAME _T("ws2.dll")
+    #define WINSOCK_DLL_NAME wxT("ws2.dll")
 #else
-    #define WINSOCK_DLL_NAME _T("wsock32.dll")
+    #define WINSOCK_DLL_NAME wxT("wsock32.dll")
 #endif
 
     gs_wsock32dll.Load(WINSOCK_DLL_NAME, wxDL_VERBATIM | wxDL_QUIET);
@@ -327,6 +327,11 @@ LRESULT CALLBACK wxSocket_Internal_WinProc(HWND hWnd,
         if ( !socket )
             return 0;
 
+        // the socket may be already closed but we could still receive
+        // notifications for it sent (asynchronously) before it got closed
+        if ( socket->m_fd == INVALID_SOCKET )
+            return 0;
+
         wxASSERT_MSG( socket->m_fd == (SOCKET)wParam,
                       "mismatch between message and socket?" );