mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user