$NetBSD: patch-ab,v 1.7 2006/04/03 19:13:21 adam Exp $ --- Windows/FileFind.cpp.orig 2006-03-19 01:56:00.000000000 +0100 +++ Windows/FileFind.cpp @@ -197,7 +197,8 @@ bool CFindFile::FindFirst(LPCTSTR wildca } TRACEN((printf("CFindFile::FindFirst : closedir-2(dirp=%p)\n",_dirp))) - closedir(_dirp); + if (_dirp) + closedir(_dirp); _dirp = 0; SetLastError( ERROR_NO_MORE_FILES ); return false;