Author: jgardou
Date: Tue Jun 12 19:21:55 2012
New Revision: 56723

URL: http://svn.reactos.org/svn/reactos?rev=56723&view=rev
Log:
[NTGDI]
- fix potential NULL access. CID 702353

Modified:
    trunk/reactos/win32ss/gdi/ntgdi/palette.c

Modified: trunk/reactos/win32ss/gdi/ntgdi/palette.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/palette.c?rev=56723&r1=56722&r2=56723&view=diff
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/palette.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/palette.c [iso-8859-1] Tue Jun 12 19:21:55 
2012
@@ -1016,10 +1016,10 @@
     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)
     {


Reply via email to