Module: wine Branch: master Commit: ea3e26e32ddeeba6a2afe3f3ee60b4cd8d859414 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea3e26e32ddeeba6a2afe3f3ee...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Apr 24 10:22:58 2012 -0500
gdiplus: Return OutOfMemory when creating a path gradient with NULL points.
---
dlls/gdiplus/brush.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index c11dea6..8dfa18d 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -578,10 +578,10 @@ GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points,
TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad);
- if(!points || !grad) + if(!grad) return InvalidParameter;
- if(count <= 0) + if(!points || count <= 0) return OutOfMemory;
stat = GdipCreatePath(FillModeAlternate, &path); @@ -611,10 +611,10 @@ GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points,
TRACE("(%p, %d, %d, %p)\n", points, count, wrap, grad);
- if(!points || !grad) + if(!grad) return InvalidParameter;
- if(count <= 0) + if(!points || count <= 0) return OutOfMemory;
stat = GdipCreatePath(FillModeAlternate, &path);