Commit 06effbf0 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Duplicate the font handle passed through WM_SETFONT, because it does

not belong to us and is not ours to free.
parent 2f2e4fab
......@@ -2187,8 +2187,11 @@ static LRESULT
TOOLTIPS_SetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LOGFONTW lf;
infoPtr->hFont = (HFONT)wParam;
if(!GetObjectW((HFONT)wParam, sizeof lf, &lf))
return 0;
infoPtr->hFont = CreateFontIndirectW(&lf);
if ((LOWORD(lParam)) & (infoPtr->nCurrentTool != -1)) {
FIXME("full redraw needed!\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment