From 01eaa29cb380ee12008e71fa6301f025f02f6dda Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Fri, 30 Jan 2009 14:36:57 +0000 Subject: [PATCH] - Fix 1 wine console test svn path=/trunk/; revision=39211 --- reactos/dll/win32/kernel32/misc/console.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/kernel32/misc/console.c b/reactos/dll/win32/kernel32/misc/console.c index 13a3b94b26e..1bf7874d708 100644 --- a/reactos/dll/win32/kernel32/misc/console.c +++ b/reactos/dll/win32/kernel32/misc/console.c @@ -2893,14 +2893,18 @@ GetConsoleCursorInfo(HANDLE hConsoleOutput, if (!lpConsoleCursorInfo) { - SetLastError(ERROR_INVALID_ACCESS); + if (!hConsoleOutput) + SetLastError(ERROR_INVALID_HANDLE); + else + SetLastError(ERROR_INVALID_ACCESS); + return FALSE; } CsrRequest = MAKE_CSR_API(GET_CURSOR_INFO, CSR_CONSOLE); Request.Data.GetCursorInfoRequest.ConsoleHandle = hConsoleOutput; - Status = CsrClientCallServer( &Request, NULL, CsrRequest, sizeof( CSR_API_MESSAGE ) ); + Status = CsrClientCallServer(&Request, NULL, CsrRequest, sizeof(CSR_API_MESSAGE)); if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status)) {