]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsockmsw.cpp
Minor header cleaning.
[wxWidgets.git] / src / msw / gsockmsw.cpp
index 7be69eb826dd0ab4190c4bd46b5b84c308a9b02a..12ae969e4ccfa42b9f30acfb3c4cb9de5add9bf1 100644 (file)
@@ -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);
 }