X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ec698211d5d82a009ac80fb354059e9af497508..e69d5138dc8f95e294ae6d03beb4f321406f4e34:/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); }