mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
- release lock on error
svn path=/trunk/; revision=27177
This commit is contained in:
parent
e2299b4583
commit
c4f39da5a8
1 changed files with 16 additions and 0 deletions
|
@ -2574,11 +2574,19 @@ CSR_API(CsrScrollConsoleScreenBuffer)
|
||||||
if (! ConioGetIntersection(&SrcRegion, &ScreenBuffer, &ScrollRectangle))
|
if (! ConioGetIntersection(&SrcRegion, &ScreenBuffer, &ScrollRectangle))
|
||||||
{
|
{
|
||||||
ConioUnlockScreenBuffer(Buff);
|
ConioUnlockScreenBuffer(Buff);
|
||||||
|
if (NULL != Console)
|
||||||
|
{
|
||||||
|
ConioUnlockConsole(Console);
|
||||||
|
}
|
||||||
return Request->Status = STATUS_INVALID_PARAMETER;
|
return Request->Status = STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UseClipRectangle && ! ConioGetIntersection(&SrcRegion, &SrcRegion, &ClipRectangle))
|
if (UseClipRectangle && ! ConioGetIntersection(&SrcRegion, &SrcRegion, &ClipRectangle))
|
||||||
{
|
{
|
||||||
|
if (NULL != Console)
|
||||||
|
{
|
||||||
|
ConioUnlockConsole(Console);
|
||||||
|
}
|
||||||
ConioUnlockScreenBuffer(Buff);
|
ConioUnlockScreenBuffer(Buff);
|
||||||
return Request->Status = STATUS_SUCCESS;
|
return Request->Status = STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2593,6 +2601,10 @@ CSR_API(CsrScrollConsoleScreenBuffer)
|
||||||
/* Make sure destination rectangle is inside the screen buffer */
|
/* Make sure destination rectangle is inside the screen buffer */
|
||||||
if (! ConioGetIntersection(&DstRegion, &DstRegion, &ScreenBuffer))
|
if (! ConioGetIntersection(&DstRegion, &DstRegion, &ScreenBuffer))
|
||||||
{
|
{
|
||||||
|
if (NULL != Console)
|
||||||
|
{
|
||||||
|
ConioUnlockConsole(Console);
|
||||||
|
}
|
||||||
ConioUnlockScreenBuffer(Buff);
|
ConioUnlockScreenBuffer(Buff);
|
||||||
return Request->Status = STATUS_INVALID_PARAMETER;
|
return Request->Status = STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
@ -2663,6 +2675,10 @@ CSR_API(CsrReadConsoleOutputChar)
|
||||||
Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputCharRequest.ConsoleHandle, &Buff);
|
Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputCharRequest.ConsoleHandle, &Buff);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
if (NULL != Console)
|
||||||
|
{
|
||||||
|
ConioUnlockConsole(Console);
|
||||||
|
}
|
||||||
return Request->Status = Status;
|
return Request->Status = Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue