[PATCH 2/2] gdiplus: dereference texture after checking it for NULL (Coverity)
Marcus Meissner
meissner at suse.de
Tue Feb 16 04:54:48 CST 2010
Hi,
spotted by Coverity last night, fixed by moving assignment down.
Ciao, Marcus
---
dlls/gdiplus/brush.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index c867f91..abcc47f 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -801,11 +801,11 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image,
TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f, %p)\n", image, imageattr, x, y, width, height,
texture);
- *texture = NULL;
-
if(!image || !texture || x < 0.0 || y < 0.0 || width < 0.0 || height < 0.0)
return InvalidParameter;
+ *texture = NULL;
+
if(image->type != ImageTypeBitmap){
FIXME("not implemented for image type %d\n", image->type);
return NotImplemented;
--
1.6.6.1
More information about the wine-patches
mailing list