Commit 42d1d9e9 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Clean up HRGN when GdipGetRegionBounds succeeds too.

parent 296b67f5
......@@ -683,17 +683,18 @@ GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics,
return Ok;
}
if(!GetRgnBox(hrgn, &r)){
DeleteObject(hrgn);
return GenericError;
if(GetRgnBox(hrgn, &r)){
rect->X = r.left;
rect->Y = r.top;
rect->Width = r.right - r.left;
rect->Height = r.bottom - r.top;
}
else
status = GenericError;
rect->X = r.left;
rect->Y = r.top;
rect->Width = r.right - r.left;
rect->Height = r.bottom - r.top;
DeleteObject(hrgn);
return Ok;
return 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