$NetBSD: patch-ab,v 1.11 2011/03/14 12:36:43 adam Exp $ --- CPP/Windows/FileFind.cpp.orig 2009-06-03 19:40:16.000000000 +0200 +++ CPP/Windows/FileFind.cpp @@ -311,7 +311,8 @@ bool CFindFile::FindFirst(LPCSTR wildcar } 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;