mirror of
https://github.com/reactos/reactos.git
synced 2024-10-21 00:18:26 +00:00
add missing check for null return
svn path=/trunk/; revision=22236
This commit is contained in:
parent
b1e6b788ce
commit
56f9a0a548
|
@ -999,7 +999,12 @@ HANDLE STDCALL NtGdiDdCreateSurfaceObject(
|
||||||
hSurface = GDIOBJ_AllocObj(DdHandleTable, GDI_OBJECT_TYPE_DD_SURFACE);
|
hSurface = GDIOBJ_AllocObj(DdHandleTable, GDI_OBJECT_TYPE_DD_SURFACE);
|
||||||
|
|
||||||
pSurface = GDIOBJ_LockObj(DdHandleTable, hSurface, 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->Local, puSurfaceLocal, sizeof(DD_SURFACE_LOCAL));
|
||||||
RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));
|
RtlMoveMemory(&pSurface->More, puSurfaceMore, sizeof(DD_SURFACE_MORE));
|
||||||
|
|
Loading…
Reference in a new issue