From: Nikolay Sivov Subject: [PATCH] gdiplus: Properly delete a DC Message-Id: <1397901299.11956.0.camel@laptop> Date: Sat, 19 Apr 2014 13:54:59 +0400 --- dlls/gdiplus/font.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index a811a60..f485058 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -1521,7 +1521,7 @@ GpStatus WINGDIPAPI GdipPrivateAddMemoryFont(GpFontCollection* fontCollection, if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)fontCollection, 0)) { - ReleaseDC(0, hdc); + DeleteDC(hdc); return OutOfMemory; } @@ -1649,7 +1649,7 @@ GpStatus WINGDIPAPI GdipNewInstalledFontCollection( if (!EnumFontFamiliesExW(hdc, &lfw, add_font_proc, (LPARAM)&installedFontCollection, 0)) { free_installed_fonts(); - ReleaseDC(0, hdc); + DeleteDC(hdc); return OutOfMemory; }