Do not set std handles when AllocConsole() fails, I swear I fixed this before...

svn path=/trunk/; revision=1135
This commit is contained in:
Phillip Susi 2000-04-24 01:52:24 +00:00
parent 23b59ecccb
commit 5fea099598

View file

@ -239,7 +239,7 @@ WINBOOL STDCALL AllocConsole(VOID)
Request.Type = CSRSS_ALLOC_CONSOLE;
Status = CsrClientCallServer( &Request, &Reply, sizeof( CSRSS_API_REQUEST ), sizeof( CSRSS_API_REPLY ) );
if( !NT_SUCCESS( Status ) || !NT_SUCCESS( Reply.Status ) )
DbgPrint( "AllocConsole Failed\n" );
return FALSE;
SetStdHandle( STD_INPUT_HANDLE, Reply.Data.AllocConsoleReply.ConsoleHandle );
SetStdHandle( STD_OUTPUT_HANDLE, Reply.Data.AllocConsoleReply.ConsoleHandle );
SetStdHandle( STD_ERROR_HANDLE, Reply.Data.AllocConsoleReply.ConsoleHandle );