]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsockmsw.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[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);
 }