File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1861,6 +1861,7 @@ void FreeAllMenuDrawInfos() {
1861
1861
// Note: could be faster
1862
1862
FreeMenuOwnerDrawInfo (g_menuDrawInfos[0 ]);
1863
1863
}
1864
+ DeleteMenuFont ();
1864
1865
}
1865
1866
1866
1867
void FreeMenuOwnerDrawInfo (MenuOwnerDrawInfo* modi) {
@@ -1881,6 +1882,10 @@ HFONT GetMenuFont() {
1881
1882
return gMenuFont ;
1882
1883
}
1883
1884
1885
+ void DeleteMenuFont () {
1886
+ DeleteFontSafe (&gMenuFont );
1887
+ }
1888
+
1884
1889
struct MenuText {
1885
1890
WCHAR* menuText;
1886
1891
int menuTextLen;
Original file line number Diff line number Diff line change @@ -163,8 +163,12 @@ int GetWndX(NotificationWnd* wnd) {
163
163
}
164
164
165
165
NotificationWnd::~NotificationWnd () {
166
+ auto fontToDelete = font;
166
167
Destroy ();
167
168
str::Free (progressMsg);
169
+ if (fontToDelete) {
170
+ DeleteObject (fontToDelete);
171
+ }
168
172
}
169
173
170
174
HWND NotificationWnd::Create (NotificationCreateArgs& args) {
You can’t perform that action at this time.
0 commit comments