From 83b90e954729e7f46a6a8506d7aaa5249998fc99 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 10 Mar 2009 04:34:33 +0000 Subject: [PATCH] Don't free a NULL pointer. svn path=/trunk/; revision=39931 --- reactos/subsystems/win32/win32k/objects/color.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/objects/color.c b/reactos/subsystems/win32/win32k/objects/color.c index 3155dd9d0cc..74f7e7a27ab 100644 --- a/reactos/subsystems/win32/win32k/objects/color.c +++ b/reactos/subsystems/win32/win32k/objects/color.c @@ -631,7 +631,8 @@ IntSetPaletteEntries(HPALETTE hpal, } memcpy(palGDI->IndexedColors + Start, pe, Entries * sizeof(PALETTEENTRY)); PALETTE_ValidateFlags(palGDI->IndexedColors, palGDI->NumColors); - ExFreePool(palGDI->logicalToSystem); + if (palGDI->logicalToSystem) + ExFreePool(palGDI->logicalToSystem); palGDI->logicalToSystem = NULL; PALETTE_UnlockPalette(palGDI);