X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdcdb90ef779185492dab676d461fc34933312..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/dir.cpp diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 672397394b..2eea8fe7ff 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -208,7 +208,7 @@ bool wxDirData::Read(wxString *filename) if ( err != ERROR_FILE_NOT_FOUND && err != ERROR_NO_MORE_FILES ) { - wxLogSysError(err, _("Can not enumerate files in directory '%s'"), + wxLogSysError(err, _("Cannot enumerate files in directory '%s'"), m_dirname.c_str()); } #endif // __WIN32__ @@ -343,9 +343,13 @@ wxString wxDir::GetName() const return name; } -wxDir::~wxDir() +void wxDir::Close() { - delete M_DIR; + if ( m_data ) + { + delete m_data; + m_data = NULL; + } } // ----------------------------------------------------------------------------