]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't forget to reset wxSocketImplMac members to NULL.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Aug 2009 23:14:02 +0000 (23:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Aug 2009 23:14:02 +0000 (23:14 +0000)
This avoids an assert in dtor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/core/sockosx.cpp

index fcd10dbc6ea1826a666ea2f44b122ef69f2b46e9..d19c7ef9016e40213cc7e888f366c6b9b0143273 100644 (file)
@@ -75,7 +75,10 @@ private:
         CFSocketInvalidate(m_socket);
 
         CFRelease(m_source);
         CFSocketInvalidate(m_socket);
 
         CFRelease(m_source);
+        m_source = NULL;
+
         CFRelease(m_socket);
         CFRelease(m_socket);
+        m_socket = NULL;
     }
 
     // initialize the data associated with the given socket
     }
 
     // initialize the data associated with the given socket
@@ -110,6 +113,8 @@ private:
         if ( !m_source )
         {
             CFRelease(m_socket);
         if ( !m_source )
         {
             CFRelease(m_socket);
+            m_socket = NULL;
+
             return false;
         }
 
             return false;
         }