gdiplus: Forbid creating path gradients with fewer than 2 points.
This commit is contained in:
parent
52bf030b84
commit
ad9976eb22
|
@ -517,6 +517,9 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
|
|||
if(!path || !grad)
|
||||
return InvalidParameter;
|
||||
|
||||
if (path->pathdata.Count < 2)
|
||||
return OutOfMemory;
|
||||
|
||||
GdipGetPathWorldBounds(path, &bounds, NULL, NULL);
|
||||
|
||||
*grad = GdipAlloc(sizeof(GpPathGradient));
|
||||
|
|
Loading…
Reference in New Issue