mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-07 05:39:46 +00:00
Merged PR 8428085: [Git2Git] Fix a GDI font object leak in FontInfo
"Leak in font object 1952 times in last 2k GDI objects created, that lead console to run out of GDI objects." Fixes MSFT-42906562 Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_we_adept_e4d2 44f47bf7dbe4bff1986ba5fd8940b56f854c58b7
This commit is contained in:
@@ -398,6 +398,10 @@ CreateBoldFont:
|
||||
/*
|
||||
* Store the font info
|
||||
*/
|
||||
if (FontInfo[nFont].hFont != nullptr)
|
||||
{
|
||||
DeleteObject(FontInfo[nFont].hFont);
|
||||
}
|
||||
FontInfo[nFont].hFont = hFont;
|
||||
FontInfo[nFont].Family = tmFamily;
|
||||
FontInfo[nFont].Size = SizeActual;
|
||||
|
||||
Reference in New Issue
Block a user