gdiplus: Return OutOfMemory when creating a path gradient with NULL points.

This commit is contained in:
Vincent Povirk 2012-04-24 10:22:58 -05:00 committed by Alexandre Julliard
parent 25ba5c8b59
commit ea3e26e32d
1 changed files with 4 additions and 4 deletions

View File

@ -578,10 +578,10 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad); TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad);
if(!points || !grad) if(!grad)
return InvalidParameter; return InvalidParameter;
if(count <= 0) if(!points || count <= 0)
return OutOfMemory; return OutOfMemory;
stat = GdipCreatePath(FillModeAlternate, &path); stat = GdipCreatePath(FillModeAlternate, &path);
@ -611,10 +611,10 @@ GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points,
TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad); TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad);
if(!points || !grad) if(!grad)
return InvalidParameter; return InvalidParameter;
if(count <= 0) if(!points || count <= 0)
return OutOfMemory; return OutOfMemory;
stat = GdipCreatePath(FillModeAlternate, &path); stat = GdipCreatePath(FillModeAlternate, &path);