gdiplus: Don't use struct member before NULL check (Coverity).
This commit is contained in:
parent
cd3954e7fd
commit
a2406b8ca5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue