From 69e9de1867d78ba54c58d028642efde1880161de Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Mon, 8 Mar 2010 11:28:25 -0600 Subject: [PATCH] gdiplus: Don't crash when creating a texture with NULL imageattributes. --- 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 abcc47f8666..287d9d8ce65 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -838,7 +838,10 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, (*texture)->brush.gdibrush = CreateBrushIndirect(&(*texture)->brush.lb); (*texture)->brush.bt = BrushTypeTextureFill; - (*texture)->wrap = imageattr->wrap; + if (imageattr) + (*texture)->wrap = imageattr->wrap; + else + (*texture)->wrap = WrapModeTile; (*texture)->image = new_image; exit: