#if wxUSE_URL
+#include "wx/url.h"
+
#ifndef WX_PRECOMP
#include "wx/list.h"
+ #include "wx/string.h"
+ #include "wx/utils.h"
#endif
-#include "wx/string.h"
-#include "wx/utils.h"
#include "wx/module.h"
-#include "wx/url.h"
#include <string.h>
#include <ctype.h>
#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()