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>
(cherry picked from commit c74d909e3b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
stable
Piotr Caban 2020-03-05 16:04:16 +01:00 committed by Michael Stefaniuc
parent 7c113aff87
commit 3b2dc114fb
1 changed files with 6 additions and 0 deletions

View File

@ -5364,7 +5364,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;