gdi32: Do not fill in the color table if lpvBits is NULL.

This commit is contained in:
Jeremy White 2007-07-13 15:45:42 -05:00 committed by Alexandre Julliard
parent 2de22f1bf0
commit fa23944695
1 changed files with 7 additions and 3 deletions

View File

@ -972,11 +972,15 @@ INT WINAPI GetDIBits(
break;
case 16:
if (bits)
{
/* Add color only when bits is given, as per MSDN */
((PDWORD)info->bmiColors)[0] = 0xf800;
((PDWORD)info->bmiColors)[1] = 0x07e0;
((PDWORD)info->bmiColors)[2] = 0x001f;
}
info->bmiHeader.biBitCount = 16;
info->bmiHeader.biCompression = BI_BITFIELDS;
((PDWORD)info->bmiColors)[0] = 0xf800;
((PDWORD)info->bmiColors)[1] = 0x07e0;
((PDWORD)info->bmiColors)[2] = 0x001f;
break;
default: