Author: tretiakov
Date: Mon Jun 5 19:38:04 2006
New Revision: 22236
URL:
http://svn.reactos.ru/svn/reactos?rev=22236&view=rev
Log:
add missing check for null return
Modified:
trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntd…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c Mon Jun 5 19:38:04 2006
@@ -999,7 +999,12 @@
hSurface = GDIOBJ_AllocObj(DdHandleTable, GDI_OBJECT_TYPE_DD_SURFACE);
pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, GDI_OBJECT_TYPE_DD_SURFACE);
- /* FIXME - Handle pSurface == NULL!!!! */
+
+ if (!pSurface)
+ {
+ GDIOBJ_UnlockObjByPtr(DdHandleTable, pDirectDraw);
+ return NULL;
+ }
RtlMoveMemory(&pSurface->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL));
RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));