[win32k] Handle invalid palette index by using the first palette entry

svn path=/trunk/; revision=44770
This commit is contained in:
Gregor Schneider 2009-12-27 15:43:48 +00:00
parent 8600c8e72b
commit f8329e21a6

View file

@ -696,6 +696,12 @@ VOID IntHandleSpecialColorType(HDC hDC, COLORREF* Color)
{
*Color = RGB(palEntry.peRed, palEntry.peGreen, palEntry.peBlue);
}
else
{
/* Index does not exist, use zero index */
IntGetPaletteEntries(pdc->dclevel.hpal, 0, 1, &palEntry);
*Color = RGB(palEntry.peRed, palEntry.peGreen, palEntry.peBlue);
}
DC_UnlockDc(pdc);
break;
default: