Commit db917247 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Fix uninitialized value jump and a leak in GdipAddPathPolygon test.

parent 97709148
...@@ -602,6 +602,8 @@ static void test_polygon(void) ...@@ -602,6 +602,8 @@ static void test_polygon(void)
points[4].X = 20.0; points[4].X = 20.0;
points[4].Y = 0.0; points[4].Y = 0.0;
GdipCreatePath(FillModeAlternate, &path);
/* NULL args */ /* NULL args */
status = GdipAddPathPolygon(NULL, points, 5); status = GdipAddPathPolygon(NULL, points, 5);
expect(InvalidParameter, status); expect(InvalidParameter, status);
...@@ -611,7 +613,6 @@ static void test_polygon(void) ...@@ -611,7 +613,6 @@ static void test_polygon(void)
status = GdipAddPathPolygon(path, points, 2); status = GdipAddPathPolygon(path, points, 2);
expect(InvalidParameter, status); expect(InvalidParameter, status);
GdipCreatePath(FillModeAlternate, &path);
/* to test how it prolongs not empty path */ /* to test how it prolongs not empty path */
status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0); status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0);
expect(Ok, status); expect(Ok, status);
...@@ -619,6 +620,8 @@ static void test_polygon(void) ...@@ -619,6 +620,8 @@ static void test_polygon(void)
expect(Ok, status); expect(Ok, status);
/* check resulting path */ /* check resulting path */
ok_path(path, poly_path, sizeof(poly_path)/sizeof(path_test_t), FALSE); ok_path(path, poly_path, sizeof(poly_path)/sizeof(path_test_t), FALSE);
GdipDeletePath(path);
} }
static path_test_t rect_path[] = { static path_test_t rect_path[] = {
......
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