X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/521bf4ff3ef47059265beff5d53c9e1162beb122..823b6635f6be00ef24a858b9766c601d9227b920:/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); }