Author: gschneider
Date: Sun Aug 16 22:11:31 2009
New Revision: 42745
URL:
http://svn.reactos.org/svn/reactos?rev=42745&view=rev
Log:
Handle failure of EngLockSurface as well
Modified:
trunk/reactos/subsystems/win32/win32k/eng/engmisc.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/engmisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/engmisc.c [iso-8859-1] Sun Aug 16 22:11:31
2009
@@ -76,6 +76,11 @@
}
*ppsoOutput = EngLockSurface((HSURF)EnterLeave->OutputBitmap);
+ if (*ppsoOutput == NULL)
+ {
+ EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
+ return FALSE;
+ }
EnterLeave->DestRect.left = 0;
EnterLeave->DestRect.top = 0;
@@ -105,9 +110,9 @@
EnterLeave->TrivialClipObj = EngCreateClip();
if (EnterLeave->TrivialClipObj == NULL)
{
- EngUnlockSurface(*ppsoOutput);
- EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
- return FALSE;
+ EngUnlockSurface(*ppsoOutput);
+ EngDeleteSurface((HSURF)EnterLeave->OutputBitmap);
+ return FALSE;
}
EnterLeave->TrivialClipObj->iDComplexity = DC_TRIVIAL;
if (ClippedDestRect.left < (*ppsoOutput)->sizlBitmap.cx &&