]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsockmsw.cpp
don't leave dummy extension in of.lpstrDefExt (bug 1609614)
[wxWidgets.git] / src / msw / gsockmsw.cpp
index a9fad98e50df4bb6f0f621ca5b14ecb56d3f917f..12ae969e4ccfa42b9f30acfb3c4cb9de5add9bf1 100644 (file)
@@ -52,7 +52,6 @@
 
 #ifndef __GSOCKET_STANDALONE__
 #   include "wx/platform.h"
 
 #ifndef __GSOCKET_STANDALONE__
 #   include "wx/platform.h"
-#   include "wx/setup.h"
 #endif
 
 #if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
 #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);
 {
   /* 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);
 }
 
   LeaveCriticalSection(&critical);
 }