gdiplus: GdipDeleteGraphics affected by busy state too. Test added.
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index bff1c86..ef2aff7 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -889,6 +889,8 @@
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
{
if(!graphics) return InvalidParameter;
+ if(graphics->busy) return ObjectBusy;
+
if(graphics->hwnd)
ReleaseDC(graphics->hwnd, graphics->hdc);
diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 90a416c..9770211 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -714,6 +714,9 @@
status = GdipMultiplyWorldTransform(graphics, m, MatrixOrderPrepend);
status = GdipGetClip(graphics, region);
expect(ObjectBusy, status); status = Ok;
+ /* try to delete before release */
+ status = GdipDeleteGraphics(graphics);
+ expect(ObjectBusy, status);
status = GdipReleaseDC(graphics, retdc);
expect(Ok, status);