From: Vadim Zeitlin Date: Sun, 16 Aug 2009 23:14:02 +0000 (+0000) Subject: Don't forget to reset wxSocketImplMac members to NULL. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/05583a26e177257410822cf09447e5047a506f7c?ds=inline Don't forget to reset wxSocketImplMac members to NULL. This avoids an assert in dtor. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/core/sockosx.cpp b/src/osx/core/sockosx.cpp index fcd10dbc6e..d19c7ef901 100644 --- a/src/osx/core/sockosx.cpp +++ b/src/osx/core/sockosx.cpp @@ -75,7 +75,10 @@ private: CFSocketInvalidate(m_socket); CFRelease(m_source); + m_source = NULL; + CFRelease(m_socket); + m_socket = NULL; } // initialize the data associated with the given socket @@ -110,6 +113,8 @@ private: if ( !m_source ) { CFRelease(m_socket); + m_socket = NULL; + return false; }