Vincent Povirk : gdiplus: Always create path gradient brushes with blend positions.
Alexandre Julliard
julliard at winehq.org
Fri Jun 25 09:40:53 CDT 2010
Module: wine
Branch: master
Commit: 4c93f9f8805251c88cb8536ed371f57cc35ecbbe
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4c93f9f8805251c88cb8536ed371f57cc35ecbbe
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sat Jun 19 16:31:14 2010 -0500
gdiplus: Always create path gradient brushes with blend positions.
---
dlls/gdiplus/brush.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 421d053..b399fce 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -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;
More information about the wine-cvs
mailing list