X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df91131cb0f90ee8bfb194926a13b1a108ca3c6e..4f6eaf5ee2335e43d6f03c99b0b3cfd53c9b6edb:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index 084a93ca85..700cb18d7e 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -23,11 +23,10 @@ #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/string.h" + #include "wx/utils.h" + #include "wx/module.h" #endif -#include "wx/utils.h" -#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()