Commit c74d909e authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

gdiplus: Fix gdi handles leak in GdipMeasureCharacterRanges.

parent ead3d068
...@@ -5373,7 +5373,13 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics, ...@@ -5373,7 +5373,13 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics* graphics,
{ {
stat = GdipSetEmpty(regions[i]); stat = GdipSetEmpty(regions[i]);
if (stat != Ok) if (stat != Ok)
{
SelectObject(hdc, oldfont);
DeleteObject(gdifont);
if (temp_hdc)
DeleteDC(temp_hdc);
return stat; return stat;
}
} }
args.regions = regions; args.regions = regions;
......
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