]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/sockmsw.cpp
Fixed wxPropertyGridManager::CreatePropertyGrid(), corrected documentation about...
[wxWidgets.git] / src / msw / sockmsw.cpp
index ebabf7d085851d2cc99b3e4fd69e1f7f964d4860..bfac07191c6a6ed9a9a425301e4a03a81d7626bc 100644 (file)
@@ -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?" );