From 51b873b3ca03074698ab027f503acd7c1940ad80 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 3 Jan 2014 14:00:10 -0600 Subject: [PATCH] gdiplus: Mark the Graphics object as busy before freeing it. --- dlls/gdiplus/graphics.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 122581df782..7f892f60a2c 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2409,6 +2409,12 @@ GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics) } GdipDeleteRegion(graphics->clip); + + /* Native returns ObjectBusy on the second free, instead of crashing as we'd + * do otherwise, but we can't have that in the test suite because it means + * accessing freed memory. */ + graphics->busy = TRUE; + GdipFree(graphics); return Ok; -- 2.11.4.GIT