]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/url.cpp
Fixed typo.
[wxWidgets.git] / src / common / url.cpp
index 3ece422a3443c6860cbe73e1ea6f7f7ec329a471..700cb18d7e59202335109af9dadf37250b61099f 100644 (file)
     #include "wx/list.h"
     #include "wx/string.h"
     #include "wx/utils.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/module.h"
-
 #include <string.h>
 #include <ctype.h>
 
@@ -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()