Destroy the old protocol before creating it anew in ParseURL().
Closes #11796.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63730
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_url = m_url + wxT("//") + m_server;
// We initialize specific variables.
+ if (m_protocol)
+ m_protocol->Destroy();
m_protocol = m_proxy; // FIXME: we should clone the protocol
}
#endif // wxUSE_PROTOCOL_HTTP
#if wxUSE_PROTOCOL_HTTP
if (!m_useProxy)
#endif // wxUSE_PROTOCOL_HTTP
+ {
if (m_protocol)
+ {
// Need to safely delete the socket (pending events)
m_protocol->Destroy();
+ m_protocol = NULL;
+ }
+ }
}
wxURL::~wxURL()