gdiplus: Don't call GetDeviceCaps for NULL dc.

This commit is contained in:
Esme Povirk 2024-05-06 11:52:56 -05:00 committed by Alexandre Julliard
parent f20a1bb94f
commit d41a1f0183

View file

@ -519,7 +519,8 @@ static GpStatus alpha_blend_hdc_pixels(GpGraphics *graphics, INT dst_x, INT dst_
if(!hbitmap || !temp_bits)
goto done;
if ((GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER &&
if ((graphics->hdc &&
GetDeviceCaps(graphics->hdc, TECHNOLOGY) == DT_RASPRINTER &&
GetDeviceCaps(graphics->hdc, SHADEBLENDCAPS) == SB_NONE) ||
fmt & PixelFormatPAlpha)
memcpy(temp_bits, src, src_width * src_height * 4);