From 62502d0670fcd5513f4cb0cfade08e319a9cf8d9 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 19 Apr 2014 13:54:59 +0400 Subject: [PATCH] gdiplus: Properly delete a DC. --- 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 a811a60b7fa..f485058a937 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; } -- 2.11.4.GIT