Commit a2406b8c authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

gdiplus: Don't use struct member before NULL check (Coverity).

parent cd3954e7
......@@ -66,7 +66,7 @@ static BOOL lengthen_path(GpPath *path, INT len)
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points,
INT count)
{
INT i, old_count = path->pathdata.Count;
INT i, old_count;
if(!path || !points)
return InvalidParameter;
......@@ -74,6 +74,8 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points,
if(!lengthen_path(path, count))
return OutOfMemory;
old_count = path->pathdata.Count;
for(i = 0; i < count; i++){
path->pathdata.Points[old_count + i].X = points[i].X;
path->pathdata.Points[old_count + i].Y = points[i].Y;
......
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