]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix socket crash in wxURL by safely Destroying the socket rather than deleting it...
authorKevin Hock <hockkn@yahoo.com>
Sun, 11 Jun 2006 18:54:07 +0000 (18:54 +0000)
committerKevin Hock <hockkn@yahoo.com>
Sun, 11 Jun 2006 18:54:07 +0000 (18:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/url.cpp

index 3ece422a3443c6860cbe73e1ea6f7f7ec329a471..14ebd7b851971f4524348072b4f872d3a75c1aca 100644 (file)
@@ -185,7 +185,9 @@ void wxURL::CleanData()
 #if wxUSE_PROTOCOL_HTTP
     if (!m_useProxy)
 #endif // wxUSE_PROTOCOL_HTTP
-        delete m_protocol;
+        if (m_protocol)
+            // Need to safely delete the socket (pending events)
+            m_protocol->Destroy();
 }
 
 wxURL::~wxURL()