File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1861,6 +1861,7 @@ void FreeAllMenuDrawInfos() {
18611861 // Note: could be faster
18621862 FreeMenuOwnerDrawInfo (g_menuDrawInfos[0 ]);
18631863 }
1864+ DeleteMenuFont ();
18641865}
18651866
18661867void FreeMenuOwnerDrawInfo (MenuOwnerDrawInfo* modi) {
@@ -1881,6 +1882,10 @@ HFONT GetMenuFont() {
18811882 return gMenuFont ;
18821883}
18831884
1885+ void DeleteMenuFont () {
1886+ DeleteFontSafe (&gMenuFont );
1887+ }
1888+
18841889struct MenuText {
18851890 WCHAR* menuText;
18861891 int menuTextLen;
Original file line number Diff line number Diff line change @@ -163,8 +163,12 @@ int GetWndX(NotificationWnd* wnd) {
163163}
164164
165165NotificationWnd::~NotificationWnd () {
166+ auto fontToDelete = font;
166167 Destroy ();
167168 str::Free (progressMsg);
169+ if (fontToDelete) {
170+ DeleteObject (fontToDelete);
171+ }
168172}
169173
170174HWND NotificationWnd::Create (NotificationCreateArgs& args) {
You can’t perform that action at this time.
0 commit comments