X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ec698211d5d82a009ac80fb354059e9af497508..90c6edd706882b8fd06b6d5359d9682ac0ee858c:/src/msw/gsockmsw.cpp?ds=sidebyside 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); }