From e933da4fdb69fd0667d2c9137717c68991ebf172 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 11 Feb 2010 16:01:14 -0600 Subject: [PATCH] gdiplus: Copy hatch brushes using the create function. The DIB used in the LOGBRUSH doesn't last long enough. --- dlls/gdiplus/brush.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 2eca75521d..0d32c0f303 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -60,13 +60,11 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone) break; } case BrushTypeHatchFill: - *clone = GdipAlloc(sizeof(GpHatch)); - if (!*clone) return OutOfMemory; - - memcpy(*clone, brush, sizeof(GpHatch)); + { + GpHatch *hatch = (GpHatch*)brush; - (*clone)->gdibrush = CreateBrushIndirect(&(*clone)->lb); - break; + return GdipCreateHatchBrush(hatch->hatchstyle, hatch->forecol, hatch->backcol, (GpHatch**)clone); + } case BrushTypePathGradient:{ GpPathGradient *src, *dest; INT count; -- 2.33.8