gdiplus: Fix gdi handles leak in GdipMeasureCharacterRanges.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-03-05 16:04:16 +01:00 committed by Alexandre Julliard
parent ead3d068f9
commit c74d909e3b
1 changed files with 6 additions and 0 deletions

View File

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