X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index 3ece422a34..700cb18d7e 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -24,10 +24,9 @@ #include "wx/list.h" #include "wx/string.h" #include "wx/utils.h" + #include "wx/module.h" #endif -#include "wx/module.h" - #include #include @@ -185,7 +184,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()