[NTGDI]
authorJérôme Gardou <jerome.gardou@reactos.org>
Tue, 12 Jun 2012 19:21:55 +0000 (19:21 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Tue, 12 Jun 2012 19:21:55 +0000 (19:21 +0000)
- fix potential NULL access. CID 702353

svn path=/trunk/; revision=56723

reactos/win32ss/gdi/ntgdi/palette.c

index cf2d514..d471850 100644 (file)
@@ -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)
     {