]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/webviewarchivehandler.cpp
Don't use "Cancel" button in the about dialog of the listctrl sample.
[wxWidgets.git] / src / common / webviewarchivehandler.cpp
index 10f15df7e07918728c78ec6ee622ca06bfb55840..6b9bdd5c24fc17ded56cd68c3e611e1aaed6b552 100644 (file)
@@ -50,6 +50,11 @@ wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) :
     m_fileSystem = new wxFileSystem();
 }
 
+wxWebViewArchiveHandler::~wxWebViewArchiveHandler()
+{
+    wxDELETE(m_fileSystem);
+}
+
 wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri)
 {
     //If there is a fragment at the end of the path then we need to strip it
@@ -81,7 +86,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri)
             return NULL;
 
         wxString fspath = "file:" + 
-                          EscapeFileNameCharsInURL(path.substr(doubleslash + 2));
+                          EscapeFileNameCharsInURL(path.substr(doubleslash + 2).c_str());
         return m_fileSystem->OpenFile(fspath);
     }
     //Otherwise we need to extract the protocol
@@ -104,7 +109,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri)
             return NULL;
 
         wxString fspath = "file:" + 
-                          EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2))
+                          EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2).c_str())
                           + "#" + protocol +":" + archivepath;
         return m_fileSystem->OpenFile(fspath);
     }