PALETTE_SetMapping do not write the palette color to NULL pointer.
authorMagnus Olsen <magnus@greatlord.com>
Thu, 29 Dec 2005 14:15:36 +0000 (14:15 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Thu, 29 Dec 2005 14:15:36 +0000 (14:15 +0000)
svn path=/trunk/; revision=20424

reactos/subsys/win32k/objects/palette.c

index 4ae9d99..d557fac 100644 (file)
@@ -329,7 +329,10 @@ INT STDCALL PALETTE_SetMapping(PALOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapO
         }
 
         if( !prevMapping || palPtr->mapping[uStart] != index ) iRemapped++;
-        palPtr->mapping[uStart] = index;
+        if (palPtr->mapping != NULL)            
+        {
+            palPtr->mapping[uStart] = index;
+        }
 
   }
   return iRemapped;