sync with trunk r46493
[reactos.git] / dll / win32 / gdiplus / brush.c
index 2f2143d..2d28004 100644 (file)
@@ -865,7 +865,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: