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

This commit is contained in:
Paul Vriens 2007-07-10 19:39:57 +02:00 committed by Alexandre Julliard
parent cd3954e7fd
commit a2406b8ca5
1 changed files with 3 additions and 1 deletions

View File

@ -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;