diff --git a/reactos/subsystems/win32/win32k/eng/xlate.c b/reactos/subsystems/win32/win32k/eng/xlate.c index 7dd1c05916f..43aec9f91f7 100644 --- a/reactos/subsystems/win32/win32k/eng/xlate.c +++ b/reactos/subsystems/win32/win32k/eng/xlate.c @@ -275,10 +275,15 @@ IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType, */ end: + if (PaletteDest != NULL) + if (PaletteDest != PaletteSource) + if (DestPalGDI != NULL) + PALETTE_UnlockPalette(DestPalGDI); + + if (PaletteSource != NULL) PALETTE_UnlockPalette(SourcePalGDI); - if (PaletteDest != NULL && PaletteDest != PaletteSource) - PALETTE_UnlockPalette(DestPalGDI); + return XlateObj; }