From 786900097722e323c847db2d9e2d9b85fe3373ab Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 30 Dec 2008 12:08:00 +0000 Subject: [PATCH] don't assert if the socket has been closed since the async notification generation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/sockmsw.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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?" ); -- 2.45.2