gdiplus: Mark the Graphics object as busy before freeing it.
Vincent Povirk
madewokherd at gmail.com
Fri Jan 3 14:03:39 CST 2014
For bug 35006.
-------------- next part --------------
From 60d7272b119195bdee0428273e809d36eecb9583 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
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 122581d..7f892f6 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;
--
1.8.1.2
More information about the wine-patches
mailing list