]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
removing early init, fixes #12231
[wxWidgets.git] / src / common / socket.cpp
index 228fe79a28d64f10c1ab23ed31520131e77621d4..182cf510c6785979656077e04ef40684f872cc77 100644 (file)
@@ -7,7 +7,7 @@
 //             (C) 1999-2000, Guillermo Rodriguez Garcia
 //             (C) 2008 Vadim Zeitlin
 // RCS_ID:     $Id$
-// License:    wxWindows licence
+// Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ==========================================================================
@@ -1789,8 +1789,7 @@ wxSocketServer::wxSocketServer(const wxSockAddress& addr,
 
     if (m_impl->CreateServer() != wxSOCKET_NOERROR)
     {
-        delete m_impl;
-        m_impl = NULL;
+        wxDELETE(m_impl);
 
         wxLogTrace( wxTRACE_Socket, wxT("*** CreateServer() failed") );
         return;
@@ -2030,8 +2029,7 @@ wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr,
 
     if ( m_impl->CreateUDP() != wxSOCKET_NOERROR )
     {
-        delete m_impl;
-        m_impl = NULL;
+        wxDELETE(m_impl);
         return;
     }