From: Paul Gofman <pgofman(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54405 --- dlls/win32u/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index ed4198991cf..60598bbc86a 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2121,7 +2121,7 @@ static DWORD wait_message( DWORD count, const HANDLE *handles, DWORD timeout, DW mask, flags ); if (HIWORD(ret)) /* is it an error code? */ { - RtlSetLastWin32Error( RtlNtStatusToDosError(ret) ); + if (count) RtlSetLastWin32Error( RtlNtStatusToDosError(ret) ); ret = WAIT_FAILED; } if (ret == WAIT_TIMEOUT && !count && !timeout) NtYieldExecution(); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2242