replace wxASSERT in wxFindNextFile() with wxCHECK to avoid crashes in release build (#9828)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-08-06 10:25:10 +00:00
parent 76be36e401
commit 31004b7405

View File

@ -1408,8 +1408,7 @@ wxString wxFindFirstFile(const wxString& spec, int flags)
if ( !wxEndsWithPathSeparator(gs_dirPath ) )
gs_dirPath << wxFILE_SEP_PATH;
if (gs_dir)
delete gs_dir;
delete gs_dir; // can be NULL, this is ok
gs_dir = new wxDir(gs_dirPath);
if ( !gs_dir->IsOpened() )
@ -1439,7 +1438,7 @@ wxString wxFindFirstFile(const wxString& spec, int flags)
wxString wxFindNextFile()
{
wxASSERT_MSG( gs_dir, wxT("You must call wxFindFirstFile before!") );
wxCHECK_MSG( gs_dir, "", "You must call wxFindFirstFile before!" );
wxString result;
gs_dir->GetNext(&result);