X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/daa3509726f9590cecc85f37ef882670667f0650..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 2e04e80098..92ce4c1f64 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1355,9 +1355,7 @@ wxString wxFindNextFile() wxCHECK_MSG( gs_dir, "", "You must call wxFindFirstFile before!" ); wxString result; - gs_dir->GetNext(&result); - - if ( result.empty() ) + if ( !gs_dir->GetNext(&result) || result.empty() ) { wxDELETE(gs_dir); return result;