]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/url.cpp
fixed line endings
[wxWidgets.git] / 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()