mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[WIN32K] Fix missing NULL check in IntCreateDIBitmap
This commit is contained in:
parent
b89a4eed72
commit
9fc56bfc9d
1 changed files with 7 additions and 1 deletions
|
@ -1578,7 +1578,13 @@ IntCreateDIBitmap(
|
|||
Surface = SURFACE_ShareLockSurface(handle);
|
||||
ASSERT(Surface);
|
||||
Palette = CreateDIBPalette(data, Dc, coloruse);
|
||||
ASSERT(Palette);
|
||||
if (Palette == NULL)
|
||||
{
|
||||
SURFACE_ShareUnlockSurface(Surface);
|
||||
GreDeleteObject(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SURFACE_vSetPalette(Surface, Palette);
|
||||
|
||||
PALETTE_ShareUnlockPalette(Palette);
|
||||
|
|
Loading…
Reference in a new issue