[5/5] gdiplus: GdipTransformRegion should not fail for an empty path.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Sep 23 21:25:57 CDT 2013
---
dlls/gdiplus/region.c | 3 +++
dlls/gdiplus/tests/region.c | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index d797459..7186518 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -1310,6 +1310,9 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr
}
/* Fall-through to do the actual conversion. */
case RegionDataPath:
+ if (!element->elementdata.pathdata.path->pathdata.Count)
+ return Ok;
+
stat = GdipTransformMatrixPoints(matrix,
element->elementdata.pathdata.path->pathdata.Points,
element->elementdata.pathdata.path->pathdata.Count);
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
index 7d20c3c..dd2f76d 100644
--- a/dlls/gdiplus/tests/region.c
+++ b/dlls/gdiplus/tests/region.c
@@ -381,7 +381,6 @@ static void test_getregiondata(void)
status = GdipCreateMatrix(&matrix);
expect(Ok, status);
status = GdipTransformRegion(region, matrix);
-todo_wine
expect(Ok, status);
GdipDeleteMatrix(matrix);
--
1.8.3.4
More information about the wine-patches
mailing list