X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd4bc54da06b4191dff7d4bc6d80ccbba22b2566..8c23ed4e210434ceea7edaa45382fd749a0256db:/src/mgl/dir.cpp diff --git a/src/mgl/dir.cpp b/src/mgl/dir.cpp index e819d37644..b325114f1c 100644 --- a/src/mgl/dir.cpp +++ b/src/mgl/dir.cpp @@ -196,8 +196,15 @@ wxDir::wxDir(const wxString& dirname) bool wxDir::Open(const wxString& dirname) { delete M_DIR; + m_data = NULL; + + if ( !wxDir::Exists(dirname) ) + { + wxLogError(_("Directory '%s' doesn't exist!"), dirname.c_str()); + return FALSE; + } + m_data = new wxDirData(dirname); - return TRUE; }