mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +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;
|
sizl.cy = nHeight;
|
||||||
pvCompressedBits = pvBits;
|
pvCompressedBits = pvBits;
|
||||||
pvBits = EngAllocMem(FL_ZERO_MEMORY, pso->cjBits, TAG_DIB);
|
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);
|
DecompressBitmap(sizl, pvCompressedBits, pvBits, pso->lDelta, iFormat);
|
||||||
fjBitmap |= BMF_RLE_HACK;
|
fjBitmap |= BMF_RLE_HACK;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +125,7 @@ GreCreateBitmapEx(
|
||||||
{
|
{
|
||||||
/* Bail out if that failed */
|
/* Bail out if that failed */
|
||||||
DPRINT1("SURFACE_bSetBitmapBits failed.\n");
|
DPRINT1("SURFACE_bSetBitmapBits failed.\n");
|
||||||
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
SURFACE_FreeSurfaceByHandle(hbmp);
|
SURFACE_FreeSurfaceByHandle(hbmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue