$NetBSD: patch-ab,v 1.3 2005/02/07 14:13:29 wiz Exp $ --- myWindows/myFindFile.cpp.orig 2005-01-17 00:16:56.000000000 +0100 +++ myWindows/myFindFile.cpp @@ -197,7 +197,8 @@ extern "C" HANDLE WINAPI FindFirstFileA( } } TRACEN((printf("FindFirstFileA : closedir-2(dirp=%p)\n",retour->dirp))) - closedir(retour->dirp); + if (retour->dirp) + closedir(retour->dirp); delete retour; SetLastError( ERROR_NO_MORE_FILES ); return INVALID_HANDLE_VALUE;