X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec904840170ef916814cae89ba8698af9f764175..ec7a8d025681979d9ea9e01350f689f5005a63ee:/src/generic/helpext.cpp diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 85f001ff41..39c9f93735 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -238,9 +238,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile) file = ifile; if(! wxIsAbsolutePath(file)) { - wxChar* f = wxGetWorkingDirectory(); - file = f; - delete[] f; // wxGetWorkingDirectory returns new memory + file = wxGetCwd(); #ifdef __WXMAC__ file << ifile; #else @@ -348,7 +346,7 @@ wxExtHelpController::DisplayContents() file << m_MapFile << WXEXTHELP_SEPARATOR << contents; if(file.Contains(wxT('#'))) file = file.BeforeLast(wxT('#')); - if(contents.Length() && wxFileExists(file)) + if(contents.length() && wxFileExists(file)) rc = DisplaySection(CONTENTS_ID); // if not found, open homemade toc: @@ -466,4 +464,3 @@ void wxExtHelpController::OnQuit() #endif // wxUSE_HELP -