Free allocated font handles when control is destroyed.

This commit is contained in:
Thomas Weidenmüller 2004-12-08 19:36:23 +00:00 committed by Alexandre Julliard
parent ce70daf3ec
commit a1f3756daa
1 changed files with 2 additions and 0 deletions

View File

@ -1637,6 +1637,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case WM_DESTROY:
TRACE("SysLink Ctrl destruction, hwnd=%p\n", hwnd);
SYSLINK_ClearDoc(infoPtr);
if(infoPtr->Font != 0) DeleteObject(infoPtr->Font);
if(infoPtr->LinkFont != 0) DeleteObject(infoPtr->LinkFont);
SYSLINK_Free (infoPtr);
SetWindowLongPtrW(hwnd, 0, 0);
return 0;