gdiplus: Properly delete a DC.
This commit is contained in:
parent
a1f8395290
commit
62502d0670
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue