Commit 960de09e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: GdipDeleteGraphics affected by busy state too. Test added.

parent 722e1f9f
......@@ -889,6 +889,8 @@ GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR * filename,
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
{
if(!graphics) return InvalidParameter;
if(graphics->busy) return ObjectBusy;
if(graphics->hwnd)
ReleaseDC(graphics->hwnd, graphics->hdc);
......
......@@ -714,6 +714,9 @@ static void test_Get_Release_DC(void)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment