Commit fa239446 authored by Jeremy White's avatar Jeremy White Committed by Alexandre Julliard

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

parent 2de22f1b
...@@ -972,11 +972,15 @@ INT WINAPI GetDIBits( ...@@ -972,11 +972,15 @@ INT WINAPI GetDIBits(
break; break;
case 16: case 16:
info->bmiHeader.biBitCount = 16; if (bits)
info->bmiHeader.biCompression = BI_BITFIELDS; {
/* Add color only when bits is given, as per MSDN */
((PDWORD)info->bmiColors)[0] = 0xf800; ((PDWORD)info->bmiColors)[0] = 0xf800;
((PDWORD)info->bmiColors)[1] = 0x07e0; ((PDWORD)info->bmiColors)[1] = 0x07e0;
((PDWORD)info->bmiColors)[2] = 0x001f; ((PDWORD)info->bmiColors)[2] = 0x001f;
}
info->bmiHeader.biBitCount = 16;
info->bmiHeader.biCompression = BI_BITFIELDS;
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment