mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[WIN32K] Add missing NULL checks
Also fix an old copy-pasta.
This commit is contained in:
parent
5f4db56486
commit
090ccb3d8e
2 changed files with 11 additions and 1 deletions
|
@ -333,6 +333,11 @@ IntCreateCompatibleBitmap(
|
|||
Planes ? Planes : 1,
|
||||
Bpp ? Bpp : dibs.dsBm.bmBitsPixel,
|
||||
NULL);
|
||||
if (Bmp == NULL)
|
||||
{
|
||||
DPRINT1("Failed to allocate a bitmap!\n");
|
||||
return NULL;
|
||||
}
|
||||
psurfBmp = SURFACE_ShareLockSurface(Bmp);
|
||||
ASSERT(psurfBmp);
|
||||
|
||||
|
@ -342,7 +347,7 @@ IntCreateCompatibleBitmap(
|
|||
/* Set flags */
|
||||
psurfBmp->flags = API_BITMAP;
|
||||
psurfBmp->hdc = NULL; // FIXME:
|
||||
psurf->SurfObj.hdev = (HDEV)Dc->ppdev;
|
||||
psurfBmp->SurfObj.hdev = (HDEV)Dc->ppdev;
|
||||
SURFACE_ShareUnlockSurface(psurfBmp);
|
||||
}
|
||||
else if (Count == sizeof(DIBSECTION))
|
||||
|
|
|
@ -69,6 +69,11 @@ CreateDIBPalette(
|
|||
0,
|
||||
0,
|
||||
0);
|
||||
if (ppal == NULL)
|
||||
{
|
||||
DPRINT1("Failed to allocate palette.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Check if the BITMAPINFO specifies how many colors to use */
|
||||
if ((pbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) &&
|
||||
|
|
Loading…
Reference in a new issue