diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 6dbe11bdfd4..3fc14d7935f 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -5043,13 +5043,18 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, info->bmiHeader.biHeight, info->bmiHeader.biBitCount ); - info->bmiHeader.biCompression = 0; if (descr.compression == BI_BITFIELDS) { *(DWORD *)info->bmiColors = descr.rMask; *((DWORD *)info->bmiColors+1) = descr.gMask; *((DWORD *)info->bmiColors+2) = descr.bMask; } + else + { + /* if RLE or JPEG compression were supported, + * this line would be invalid. */ + info->bmiHeader.biCompression = 0; + } done: GDI_ReleaseObj( dc->hPalette );