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

This commit is contained in:
Nikolay Sivov 2008-06-28 11:08:39 +04:00 committed by Alexandre Julliard
parent 97709148c3
commit db9172471b
1 changed files with 4 additions and 1 deletions

View File

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