Fixed font object leak in WM_SETFONT handler.

This commit is contained in:
Sander van Leeuwen 2002-10-29 21:28:37 +00:00 committed by Alexandre Julliard
parent 6f31013f7b
commit f9768f4792
1 changed files with 2 additions and 0 deletions

View File

@ -2093,6 +2093,8 @@ TOOLTIPS_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
if(!GetObjectW((HFONT)wParam, sizeof lf, &lf)) if(!GetObjectW((HFONT)wParam, sizeof lf, &lf))
return 0; return 0;
if(infoPtr->hFont) DeleteObject (infoPtr->hFont);
infoPtr->hFont = CreateFontIndirectW(&lf); infoPtr->hFont = CreateFontIndirectW(&lf);
if ((LOWORD(lParam)) & (infoPtr->nCurrentTool != -1)) { if ((LOWORD(lParam)) & (infoPtr->nCurrentTool != -1)) {