mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +00:00
Increment a console's initial screen buffer's reference count *after* calling CsrInitConsoleScreenBuffer (which sets the reference count to 0). Fixes bug 3524.
svn path=/trunk/; revision=34539
This commit is contained in:
@@ -191,9 +191,6 @@ CsrInitConsole(PCSRSS_CONSOLE Console)
|
||||
/* make console active, and insert into console list */
|
||||
Console->ActiveBuffer = (PCSRSS_SCREEN_BUFFER) NewBuffer;
|
||||
Console->hActiveBuffer = INVALID_HANDLE_VALUE;
|
||||
/* add a reference count because the buffer is tied to the console */
|
||||
InterlockedIncrement(&Console->ActiveBuffer->Header.ReferenceCount);
|
||||
|
||||
|
||||
if (! GuiMode)
|
||||
{
|
||||
@@ -230,6 +227,9 @@ CsrInitConsole(PCSRSS_CONSOLE Console)
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* add a reference count because the buffer is tied to the console */
|
||||
InterlockedIncrement(&Console->ActiveBuffer->Header.ReferenceCount);
|
||||
|
||||
/* copy buffer contents to screen */
|
||||
ConioDrawConsole(Console);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user