X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ecff18117f8cabc0f515ad81aa4ad265e5e17d3..5fa150e233fa449ee270ac26ecf074f5c40acb1e:/src/common/url.cpp diff --git a/src/common/url.cpp b/src/common/url.cpp index 65f2fe7265..700cb18d7e 100644 --- a/src/common/url.cpp +++ b/src/common/url.cpp @@ -18,15 +18,15 @@ #if wxUSE_URL +#include "wx/url.h" + #ifndef WX_PRECOMP #include "wx/list.h" + #include "wx/string.h" + #include "wx/utils.h" + #include "wx/module.h" #endif -#include "wx/string.h" -#include "wx/utils.h" -#include "wx/module.h" -#include "wx/url.h" - #include <string.h> #include <ctype.h> @@ -184,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()