From 1a08ecee219db1ea1fa53de4239879e21b9651ff 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 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index abcc47f..287d9d8 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: -- 1.7.0