X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c363ead1e206e599d6564ac939ac7342d165e0e3..3cfde7c049bddf6fd3b4c2e35a6b8ecdcdc1d74f:/src/msw/sockmsw.cpp diff --git a/src/msw/sockmsw.cpp b/src/msw/sockmsw.cpp index ebabf7d085..bfac07191c 100644 --- a/src/msw/sockmsw.cpp +++ b/src/msw/sockmsw.cpp @@ -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?" );