gdiplus: Fix a memory leak.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2018-06-18 22:00:09 +08:00 committed by Alexandre Julliard
parent ecd16fed38
commit 40ce1dd473
1 changed files with 5 additions and 1 deletions

View File

@ -1069,7 +1069,11 @@ static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
{
HDC hdc = CreateCompatibleDC(NULL);
if (!hdc) break;
if (!hdc)
{
DeleteObject(bmp);
break;
}
SelectObject(hdc, bmp);
gdi_alpha_blend(graphics, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,