mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 15:51:49 +00:00
[win32k] Handle invalid palette index by using the first palette entry
svn path=/trunk/; revision=44770
This commit is contained in:
parent
8600c8e72b
commit
f8329e21a6
1 changed files with 6 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue