$NetBSD: patch-ab,v 1.5 2005/05/17 07:22:37 adam Exp $ --- Windows/FileFind.cpp.orig 2005-05-07 21:28:16.000000000 +0000 +++ Windows/FileFind.cpp @@ -181,7 +181,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;