mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 05:36:41 +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:
parent
0f5230d382
commit
44e8888c47
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue