From: Kevin Hock Date: Sun, 11 Jun 2006 18:54:07 +0000 (+0000) Subject: Fix socket crash in wxURL by safely Destroying the socket rather than deleting it... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5f3742c2ff35658c9c73d40ffddd6b9733766bff Fix socket crash in wxURL by safely Destroying the socket rather than deleting it [ patch 1502964 ] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/url.cpp b/src/common/url.cpp index 3ece422a34..14ebd7b851 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -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()