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