-- v2: gdiplus: Add a couple of missing gdi_dc_release().
From: Dmitry Timoshkov dmitry@baikal.ru
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57036 Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/gdiplus/graphics.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index bdb2e1c917c..1a11cca1892 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5912,7 +5912,8 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * args.rel_width; - if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */ + if (scaled_rect.Width < 0.5) /* doesn't fit */ + goto end; }
if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23; @@ -5943,7 +5944,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
SelectObject(hdc, oldfont); DeleteObject(gdifont); - +end: if (temp_hdc) DeleteDC(temp_hdc); else @@ -6091,7 +6092,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string if (scaled_rect.Width >= 0.5) { scaled_rect.Width -= margin_x * 2.0 * rel_width; - if (scaled_rect.Width < 0.5) return Ok; /* doesn't fit */ + if (scaled_rect.Width < 0.5) /* doesn't fit */ + goto end; }
if (scaled_rect.Width >= 1 << 23) scaled_rect.Width = 1 << 23; @@ -6129,7 +6131,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
DeleteObject(rgn); DeleteObject(gdifont); - +end: RestoreDC(hdc, save_state);
if (temp_hdc)
This merge request was approved by Esme Povirk.