gdiplus: Return OutOfMemory when creating a path gradient with NULL points.
This commit is contained in:
parent
25ba5c8b59
commit
ea3e26e32d
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue