Handle failure of EngLockSurface as well

svn path=/trunk/; revision=42745
This commit is contained in:
Gregor Schneider 2009-08-16 20:11:31 +00:00
parent ac35e87724
commit c365f1c1bb

View file

@ -76,6 +76,11 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
} }
*ppsoOutput = EngLockSurface((HSURF)EnterLeave->OutputBitmap); *ppsoOutput = EngLockSurface((HSURF)EnterLeave->OutputBitmap);
if (*ppsoOutput == NULL)
{
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
return FALSE;
}
EnterLeave->DestRect.left = 0; EnterLeave->DestRect.left = 0;
EnterLeave->DestRect.top = 0; EnterLeave->DestRect.top = 0;
@ -105,9 +110,9 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave,
EnterLeave->TrivialClipObj = EngCreateClip(); EnterLeave->TrivialClipObj = EngCreateClip();
if (EnterLeave->TrivialClipObj == NULL) if (EnterLeave->TrivialClipObj == NULL)
{ {
EngUnlockSurface(*ppsoOutput); EngUnlockSurface(*ppsoOutput);
EngDeleteSurface((HSURF)EnterLeave->OutputBitmap); EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
return FALSE; return FALSE;
} }
EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL; EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL;
if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx && if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&