[2/4] gdiplus: Return OutOfMemory when creating a path gradient from a NULL path.

Vincent Povirk madewokherd at gmail.com
Thu Apr 26 08:52:33 CDT 2012


-------------- next part --------------
From 9e029074b96a16ceded8980167b99eb41164cbc8 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 24 Apr 2012 10:26:12 -0500
Subject: [PATCH 2/8] gdiplus: Return OutOfMemory when creating a path
 gradient from a NULL path.

---
 dlls/gdiplus/brush.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index 8dfa18d..184c8de 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -647,9 +647,12 @@ GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path,
 
     TRACE("(%p, %p)\n", path, grad);
 
-    if(!path || !grad)
+    if(!grad)
         return InvalidParameter;
 
+    if (!path)
+        return OutOfMemory;
+
     stat = GdipClonePath((GpPath*)path, &new_path);
 
     if (stat == Ok)
-- 
1.7.9.5


More information about the wine-patches mailing list