Commit 4c93f9f8 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Always create path gradient brushes with blend positions.

parent 01780935
......@@ -574,12 +574,15 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
if (!*grad) return OutOfMemory;
(*grad)->blendfac = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac){
(*grad)->blendpos = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac || !(*grad)->blendpos){
GdipFree((*grad)->blendfac);
GdipFree((*grad)->blendpos);
GdipFree(*grad);
return OutOfMemory;
}
(*grad)->blendfac[0] = 1.0;
(*grad)->blendpos = NULL;
(*grad)->blendpos[0] = 1.0;
(*grad)->blendcount = 1;
(*grad)->pathdata.Count = count;
......@@ -664,12 +667,15 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
if (!*grad) return OutOfMemory;
(*grad)->blendfac = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac){
(*grad)->blendpos = GdipAlloc(sizeof(REAL));
if(!(*grad)->blendfac || !(*grad)->blendpos){
GdipFree((*grad)->blendfac);
GdipFree((*grad)->blendpos);
GdipFree(*grad);
return OutOfMemory;
}
(*grad)->blendfac[0] = 1.0;
(*grad)->blendpos = NULL;
(*grad)->blendpos[0] = 1.0;
(*grad)->blendcount = 1;
(*grad)->pathdata.Count = path->pathdata.Count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment