mirror of
https://github.com/reactos/reactos.git
synced 2024-07-17 18:06:11 +00:00
Return NULL, if failed to lock the provided palette in InrEngCreateXlate. Fixes bug 4378.
See issue #4378 for more details. svn path=/trunk/; revision=40502
This commit is contained in:
parent
e05f6c1a3e
commit
b4c029b29e
|
@ -177,9 +177,23 @@ IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
|
|||
DestPalGDI = PALETTE_LockPalette(PaletteDest);
|
||||
|
||||
if (SourcePalType == 0)
|
||||
{
|
||||
if (!SourcePalGDI)
|
||||
{
|
||||
DPRINT1("Failed to lock source palette %p\n", PaletteSource);
|
||||
return NULL;
|
||||
}
|
||||
SourcePalType = SourcePalGDI->Mode;
|
||||
}
|
||||
if (DestPalType == 0)
|
||||
{
|
||||
if (!DestPalGDI)
|
||||
{
|
||||
DPRINT1("Failed to lock dest palette %p\n", PaletteDest);
|
||||
return NULL;
|
||||
}
|
||||
DestPalType = DestPalGDI->Mode;
|
||||
}
|
||||
|
||||
XlateObj->iSrcType = SourcePalType;
|
||||
XlateObj->iDstType = DestPalType;
|
||||
|
|
Loading…
Reference in a new issue