X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/daf3246330c8ae7b4536cd1f6deef733a405cecd..d26e1ab2061fa549653c7b7e5f3ae04f7fa2e003:/src/common/filefn.cpp?ds=sidebyside diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 3c0a2f5285..99a1f807a6 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -354,7 +354,7 @@ wxString wxPathList::FindValidPath (const wxString& file) wxString wxPathList::FindAbsoluteValidPath (const wxString& file) { wxString f = FindValidPath(file); - if ( wxIsAbsolutePath(f) ) + if ( f.empty() || wxIsAbsolutePath(f) ) return f; wxString buf; @@ -879,6 +879,9 @@ wxString wxPathOnly (const wxString& path) // Unix like or Windows if (path[i] == wxT('/') || path[i] == wxT('\\')) { + // Don't return an empty string + if (i == 0) + i ++; buf[i] = 0; return wxString(buf); }