From f9768f4792ad81cc16ac1077c758f8e8a5603da0 Mon Sep 17 00:00:00 2001 From: Sander van Leeuwen Date: Tue, 29 Oct 2002 21:28:37 +0000 Subject: [PATCH] Fixed font object leak in WM_SETFONT handler. --- dlls/comctl32/tooltips.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 538c7ce3098..1be2548e876 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -2093,6 +2093,8 @@ TOOLTIPS_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam) if(!GetObjectW((HFONT)wParam, sizeof lf, &lf)) return 0; + + if(infoPtr->hFont) DeleteObject (infoPtr->hFont); infoPtr->hFont = CreateFontIndirectW(&lf); if ((LOWORD(lParam)) & (infoPtr->nCurrentTool != -1)) { -- 2.11.4.GIT