From 99e5f24b6d0eae88a03034fd8025c459a42776a9 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 13 Oct 2016 16:23:14 -0500 Subject: [PATCH] gdiplus: GdipDrawLine ignores 0-pixel pens. Signed-off-by: Vincent Povirk Signed-off-by: Alexandre Julliard --- dlls/gdiplus/graphics.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 076ed81d12a..c75618c97db 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3306,6 +3306,12 @@ GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, pen, x1, y1, x2, y2); + if (!pen) + return InvalidParameter; + + if (pen->unit == UnitPixel && pen->width <= 0.0) + return Ok; + pt[0].X = x1; pt[0].Y = y1; pt[1].X = x2;