$NetBSD: patch-ab,v 1.8 2007/01/27 21:50:11 adam Exp $ --- CPP/Windows/FileFind.cpp.orig 2007-01-20 18:06:40.000000000 +0100 +++ CPP/Windows/FileFind.cpp @@ -264,7 +264,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;