Dmitry Timoshkov : gdiplus: GdipTransformRegion should not fail for an empty path.
Alexandre Julliard
julliard at winehq.org
Tue Sep 24 15:16:48 CDT 2013
Module: wine
Branch: master
Commit: ec9a0d85705941e024c366a2f740a5f9e3d1419f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ec9a0d85705941e024c366a2f740a5f9e3d1419f
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Sep 24 11:25:57 2013 +0900
gdiplus: GdipTransformRegion should not fail for an empty path.
---
dlls/gdiplus/region.c | 3 +++
dlls/gdiplus/tests/region.c | 1 -
2 files changed, 3 insertions(+), 1 deletions(-)
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);
More information about the wine-cvs
mailing list