]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckipc.cpp
Use child's listmodelnotifier's destructor (by overloading
[wxWidgets.git] / src / common / sckipc.cpp
index 3b03e2de76f10366f6e442e261e19f3e6a0db596..9922b0d04c001bb706b8fd517370cc2a352d19d4 100644 (file)
@@ -381,8 +381,13 @@ bool wxTCPConnection::Disconnect ()
       return true;
   // Send the the disconnect message to the peer.
   m_codeco->Write8(IPC_DISCONNECT);
-  m_sock->Notify(false);
-  m_sock->Close();
+
+  if ( m_sock )
+  {
+      m_sock->Notify(false);
+      m_sock->Close();
+  }
+
   SetConnected(false);
 
   return true;