From 92cc6200470b8a85a8825a1fc8d7e9dcf68a7d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Tue, 12 Jun 2012 19:21:55 +0000 Subject: [PATCH] [NTGDI] - fix potential NULL access. CID 702353 svn path=/trunk/; revision=56723 --- reactos/win32ss/gdi/ntgdi/palette.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/palette.c b/reactos/win32ss/gdi/ntgdi/palette.c index cf2d514e399..d471850d5e7 100644 --- a/reactos/win32ss/gdi/ntgdi/palette.c +++ b/reactos/win32ss/gdi/ntgdi/palette.c @@ -1016,10 +1016,10 @@ GreGetSetColorTable( psurf = pdc->dclevel.pSurface; /* Check if we have the default surface */ - if ((psurf == NULL) && !bSet) + if (psurf == NULL) { /* Use a mono palette */ - ppal = gppalMono; + if(!bSet) ppal = gppalMono; } else if (psurf->SurfObj.iType == STYPE_BITMAP) {