fix a kernel32 console winetest crash
authorChristoph von Wittich <christoph_vw@reactos.org>
Sat, 17 Jan 2009 21:05:15 +0000 (21:05 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sat, 17 Jan 2009 21:05:15 +0000 (21:05 +0000)
svn path=/trunk/; revision=38851

reactos/dll/win32/kernel32/misc/console.c

index 3eb651b..0d257b9 100644 (file)
@@ -2850,6 +2850,12 @@ GetConsoleCursorInfo(
 
    NTSTATUS Status;
 
+   if (!lpConsoleCursorInfo)
+   {
+       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 ) );