Module: wine Branch: master Commit: d41a1f0183f5686fa3ed1b42c4de07e393833925 URL: https://gitlab.winehq.org/wine/wine/-/commit/d41a1f0183f5686fa3ed1b42c4de07e...
Author: Esme Povirk esme@codeweavers.com Date: Mon May 6 11:52:56 2024 -0500
gdiplus: Don't call GetDeviceCaps for NULL dc.
---
dlls/gdiplus/graphics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 58fa129b504..14e09e7cc47 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -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);