X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ec698211d5d82a009ac80fb354059e9af497508..ccdc11bbaf0310a474ad7b9d41413b31c3544356:/src/msw/gsockmsw.cpp?ds=inline diff --git a/src/msw/gsockmsw.cpp b/src/msw/gsockmsw.cpp index a9fad98e50..12ae969e4c 100644 --- a/src/msw/gsockmsw.cpp +++ b/src/msw/gsockmsw.cpp @@ -52,7 +52,6 @@ #ifndef __GSOCKET_STANDALONE__ # include "wx/platform.h" -# include "wx/setup.h" #endif #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) @@ -336,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); }