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
This commit is contained in:
Vadim Zeitlin 2012-12-08 00:37:25 +00:00
parent e0e4b2b0e9
commit bd9fd76ec7

View File

@ -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;