gdi32: Do not fill in the color table if lpvBits is NULL.
This commit is contained in:
parent
2de22f1bf0
commit
fa23944695
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue