From 268d48187759d3a716a6a22d2210c41bbf4d9869 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 29 Jul 2012 12:22:06 +0000 Subject: [PATCH] [WIN32K] Check for NULL dc surface before dereferencing it in IntGdiRealizePalette. svn path=/trunk/; revision=56980 --- reactos/win32ss/gdi/ntgdi/palette.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/win32ss/gdi/ntgdi/palette.c b/reactos/win32ss/gdi/ntgdi/palette.c index d471850d5e7..ff600d7ce38 100644 --- a/reactos/win32ss/gdi/ntgdi/palette.c +++ b/reactos/win32ss/gdi/ntgdi/palette.c @@ -767,6 +767,11 @@ IntGdiRealizePalette(HDC hDC) return 0; } + if (!pdc->dclevel.pSurface) + { + goto cleanup; + } + ppalSurf = pdc->dclevel.pSurface->ppal; ppalDC = pdc->dclevel.ppal;