Author: tkreuzer
Date: Sat Aug 15 00:08:15 2009
New Revision: 42671
URL:
http://svn.reactos.org/svn/reactos?rev=42671&view=rev
Log:
[win32k] EngCreateDeviceBitmap: handle failure of EngLockSurface. Found by Amine.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/surface.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Sat Aug 15 00:08:15
2009
@@ -191,6 +191,13 @@
}
pso = EngLockSurface((HSURF)NewBitmap);
+ if (!pso)
+ {
+ DPRINT1("EngLockSurface failed on newly created bitmap!\n");
+ GreDeleteObject(NewBitmap);
+ return NULL;
+ }
+
pso->dhsurf = dhsurf;
EngUnlockSurface(pso);