#ifndef __GSOCKET_STANDALONE__
# include "wx/platform.h"
-# include "wx/setup.h"
#endif
#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
{
/* 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);
}