X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a236aa2058ccf3d36e9cafc20fa7375080c4be50..e3276230de335908f70232b2a5ede43665bd8d9d:/src/msw/dir.cpp diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 5525d72a61..1bdeb321f7 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -303,9 +303,20 @@ wxDir::wxDir(const wxString& dirname) bool wxDir::Open(const wxString& dirname) { delete M_DIR; - m_data = new wxDirData(dirname); + + // The Unix code does a similar test + if (wxDirExists(dirname)) + { + m_data = new wxDirData(dirname); - return true; + return true; + } + else + { + m_data = NULL; + + return false; + } } bool wxDir::IsOpened() const