gdiplus: Check for NULL image in GdipImageRotateFlip.

Vincent Povirk madewokherd at gmail.com
Wed Jun 13 13:46:44 CDT 2012


-------------- next part --------------
From 15e241c961bb7a353658c338f6b1650c27ed7a97 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Wed, 13 Jun 2012 13:39:35 -0500
Subject: [PATCH] gdiplus: Check for NULL image in GdipImageRotateFlip.

---
 dlls/gdiplus/image.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index ce04c72..dd4dcea 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -3889,6 +3889,9 @@ GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType type)
 
     TRACE("(%p, %u)\n", image, type);
 
+    if (!image)
+        return InvalidParameter;
+
     rotate_90 = type&1;
     flip_x = (type&6) == 2 || (type&6) == 4;
     flip_y = (type&3) == 1 || (type&3) == 2;
-- 
1.7.9.5


More information about the wine-patches mailing list