mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
[WIN32K]
In GreCreateBitmapEx handle allocation failure in the rle hack path and set LastError, when failed to allocate bitmap bits. svn path=/trunk/; revision=50344
This commit is contained in:
parent
39b87b357f
commit
c2c492d850
1 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,12 @@ GreCreateBitmapEx(
|
|||
sizl.cy = nHeight;
|
||||
pvCompressedBits = pvBits;
|
||||
pvBits = EngAllocMem(FL_ZERO_MEMORY, pso->cjBits, TAG_DIB);
|
||||
if (!pvBits)
|
||||
{
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
SURFACE_FreeSurfaceByHandle(hbmp);
|
||||
return NULL;
|
||||
}
|
||||
DecompressBitmap(sizl, pvCompressedBits, pvBits, pso->lDelta, iFormat);
|
||||
fjBitmap |= BMF_RLE_HACK;
|
||||
}
|
||||
|
@ -119,6 +125,7 @@ GreCreateBitmapEx(
|
|||
{
|
||||
/* Bail out if that failed */
|
||||
DPRINT1("SURFACE_bSetBitmapBits failed.\n");
|
||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
SURFACE_FreeSurfaceByHandle(hbmp);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue