#ifdef __WINDOWS__
#include "wx/msw/private.h"
+ #include "wx/msw/missing.h"
#include "wx/msw/mslu.h"
// sys/cygwin.h is needed for cygwin_conv_to_full_win32_path()
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;