From 8f7749aa451b0fc7c7ef7932cbc2ed28f603500d Mon Sep 17 00:00:00 2001 From: Jeff Smith Date: Thu, 26 Oct 2023 00:17:58 -0500 Subject: [PATCH] gdiplus: Fix a GdipSetPageScale return status. --- dlls/gdiplus/graphics.c | 5 ++++- dlls/gdiplus/tests/graphics.c | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 32c45458c8f..6cc0c3bfbe3 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -6164,12 +6164,15 @@ GpStatus WINGDIPAPI GdipSetPageScale(GpGraphics *graphics, REAL scale) TRACE("(%p, %.2f)\n", graphics, scale); - if(!graphics || (scale <= 0.0)) + if(!graphics) return InvalidParameter; if(graphics->busy) return ObjectBusy; + if(scale <= 0.0) + return InvalidParameter; + if (is_metafile_graphics(graphics)) { stat = METAFILE_SetPageTransform((GpMetafile*)graphics->image, graphics->unit, scale); diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 784a88d9a70..5f502b72593 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -1847,7 +1847,6 @@ static void test_Get_Release_DC(void) status = GdipSetPageScale(graphics, 1.0); expect(ObjectBusy, status); status = GdipSetPageScale(graphics, 0.0); - todo_wine expect(ObjectBusy, status); status = GdipSetPageUnit(graphics, UnitWorld); expect(ObjectBusy, status); -- 2.11.4.GIT