From: Vadim Zeitlin Date: Sat, 8 Dec 2012 00:37:25 +0000 (+0000) Subject: Check wxDir::GetNext() return value in wxFindNextFile(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bd9fd76ec723d6860832221e55e96759573c928b Check wxDir::GetNext() return value in wxFindNextFile(). This doesn't really change anything as the returned value would be empty anyhow in case of an error, but suppresses Coverity warning about not checking the return value of a function whose return value is checked in other places. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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;