mirror of
https://github.com/reactos/reactos.git
synced 2025-03-30 17:10:22 +00:00
Handle failure of EngCreateClip, spotted by Amine Khaldi
svn path=/trunk/; revision=42743
This commit is contained in:
parent
ea7be198c3
commit
f145632ab6
1 changed files with 11 additions and 5 deletions
|
@ -103,6 +103,12 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
|
|||
ClippedDestRect.bottom = ClippedDestRect.top + psoDest->sizlBitmap.cy - SrcPoint.y;
|
||||
}
|
||||
EnterLeave->TrivialClipObj = EngCreateClip();
|
||||
if (EnterLeave->TrivialClipObj == NULL)
|
||||
{
|
||||
EngUnlockSurface(*ppsoOutput);
|
||||
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
||||
return FALSE;
|
||||
}
|
||||
EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL;
|
||||
if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&
|
||||
0 <= ClippedDestRect.right &&
|
||||
|
@ -115,11 +121,11 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
|
|||
EnterLeave->TrivialClipObj, NULL,
|
||||
&ClippedDestRect, &SrcPoint))
|
||||
{
|
||||
EngDeleteClip(EnterLeave->TrivialClipObj);
|
||||
EngFreeMem((*ppsoOutput)->pvBits);
|
||||
EngUnlockSurface(*ppsoOutput);
|
||||
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
||||
return FALSE;
|
||||
EngDeleteClip(EnterLeave->TrivialClipObj);
|
||||
EngFreeMem((*ppsoOutput)->pvBits);
|
||||
EngUnlockSurface(*ppsoOutput);
|
||||
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
||||
return FALSE;
|
||||
}
|
||||
EnterLeave->DestRect.left = DestRect->left;
|
||||
EnterLeave->DestRect.top = DestRect->top;
|
||||
|
|
Loading…
Reference in a new issue