X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..c782096417f0fd9de6c6d47b23174233ec6bcf57:/src/msw/gsockmsw.cpp?ds=sidebyside diff --git a/src/msw/gsockmsw.cpp b/src/msw/gsockmsw.cpp index 7be69eb826..12ae969e4c 100644 --- a/src/msw/gsockmsw.cpp +++ b/src/msw/gsockmsw.cpp @@ -335,7 +335,8 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket) { /* Remove the socket from the list */ EnterCriticalSection(&critical); - socketList[(socket->m_msgnumber - WM_USER)] = NULL; + if ( socket->IsOk() ) + socketList[(socket->m_msgnumber - WM_USER)] = NULL; LeaveCriticalSection(&critical); }