On Wed, 24 Apr 2002, Michael Cardenas wrote: > Attached is a patch that corrects martin wilck's previous patch. It just adds > an if flags before deref'ing the flags variable. Not sure if this is the most > correct, but it corrects the crash.
OK, it was a really stupid bug resulting from the fact that File_GetUnixHandle would call File_GetUnixHandleType. Strange I didn't run into it myself yet. However I'd recommend the following patch instead of yours - please try if it also solves your problem. Cheers and thanks for spotting this, Martin --- files/file.c.orig Thu Apr 25 11:18:30 2002 +++ files/file.c Thu Apr 25 11:17:37 2002 @@ -361,7 +361,11 @@ */ int FILE_GetUnixHandle( HANDLE handle, DWORD access ) { - return FILE_GetUnixHandleType( handle, access, NULL, NULL ); + int ret, fd = -1; + + ret = wine_server_handle_to_fd( handle, access, &fd, NULL, NULL ); + if (ret) SetLastError( RtlNtStatusToDosError(ret) ); + return fd; } /*************************************************************************