Commit ec9a0d85 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: GdipTransformRegion should not fail for an empty path.

parent 3870e5b2
...@@ -1310,6 +1310,9 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr ...@@ -1310,6 +1310,9 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr
} }
/* Fall-through to do the actual conversion. */ /* Fall-through to do the actual conversion. */
case RegionDataPath: case RegionDataPath:
if (!element->elementdata.pathdata.path->pathdata.Count)
return Ok;
stat = GdipTransformMatrixPoints(matrix, stat = GdipTransformMatrixPoints(matrix,
element->elementdata.pathdata.path->pathdata.Points, element->elementdata.pathdata.path->pathdata.Points,
element->elementdata.pathdata.path->pathdata.Count); element->elementdata.pathdata.path->pathdata.Count);
......
...@@ -381,7 +381,6 @@ static void test_getregiondata(void) ...@@ -381,7 +381,6 @@ static void test_getregiondata(void)
status = GdipCreateMatrix(&matrix); status = GdipCreateMatrix(&matrix);
expect(Ok, status); expect(Ok, status);
status = GdipTransformRegion(region, matrix); status = GdipTransformRegion(region, matrix);
todo_wine
expect(Ok, status); expect(Ok, status);
GdipDeleteMatrix(matrix); GdipDeleteMatrix(matrix);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment