mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:56:26 +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;
|
ClippedDestRect.bottom = ClippedDestRect.top + psoDest->sizlBitmap.cy - SrcPoint.y;
|
||||||
}
|
}
|
||||||
EnterLeave->TrivialClipObj = EngCreateClip();
|
EnterLeave->TrivialClipObj = EngCreateClip();
|
||||||
|
if (EnterLeave->TrivialClipObj == NULL)
|
||||||
|
{
|
||||||
|
EngUnlockSurface(*ppsoOutput);
|
||||||
|
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL;
|
EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL;
|
||||||
if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&
|
if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&
|
||||||
0 <= ClippedDestRect.right &&
|
0 <= ClippedDestRect.right &&
|
||||||
|
@ -115,11 +121,11 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
|
||||||
EnterLeave->TrivialClipObj, NULL,
|
EnterLeave->TrivialClipObj, NULL,
|
||||||
&ClippedDestRect, &SrcPoint))
|
&ClippedDestRect, &SrcPoint))
|
||||||
{
|
{
|
||||||
EngDeleteClip(EnterLeave->TrivialClipObj);
|
EngDeleteClip(EnterLeave->TrivialClipObj);
|
||||||
EngFreeMem((*ppsoOutput)->pvBits);
|
EngFreeMem((*ppsoOutput)->pvBits);
|
||||||
EngUnlockSurface(*ppsoOutput);
|
EngUnlockSurface(*ppsoOutput);
|
||||||
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
EnterLeave->DestRect.left = DestRect->left;
|
EnterLeave->DestRect.left = DestRect->left;
|
||||||
EnterLeave->DestRect.top = DestRect->top;
|
EnterLeave->DestRect.top = DestRect->top;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue