--- trunk/reactos/subsys/win32k/eng/mouse.c 2005-12-29 08:43:45 UTC (rev 20414)
+++ trunk/reactos/subsys/win32k/eng/mouse.c 2005-12-29 10:53:01 UTC (rev 20415)
@@ -389,6 +389,11 @@
PBYTE Bits;
Bits = EngAllocMem(0, psoColor->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoColor->pvBits, psoColor->cjBits);
pgp->ColorSurface = (HSURF)EngCreateBitmap(pgp->Size,
@@ -407,6 +412,11 @@
Size.cx = pgp->Size.cx;
Size.cy = pgp->Size.cy << 1;
Bits = EngAllocMem(0, psoMask->cjBits, TAG_MOUSE);
+ if (Bits == NULL)
+ {
+ return SPS_ERROR;
+ }
+
memcpy(Bits, psoMask->pvBits, psoMask->cjBits);
pgp->MaskSurface = (HSURF)EngCreateBitmap(Size,