[WINESYNC][COMCTL32] Don't delete font when destroying the control (#7941)

The font object `infoPtr->Font` is not owned by the `syslink` control, therefore freeing it would make the whole system use a different font. The fix provided by Wine removes the code that deletes this font object.

Imports Wine commit 480598680c

Fixes deleting system font object when destroying syslink. CORE-20127
This commit is contained in:
Mohammad Amin Mollazadeh 2025-05-04 02:44:24 +03:30 committed by GitHub
parent a9ba54f678
commit 21d3e290b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1719,7 +1719,9 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
case WM_DESTROY:
TRACE("SysLink Ctrl destruction, hwnd=%p\n", hwnd);
SYSLINK_ClearDoc(infoPtr);
#ifndef __REACTOS__
if(infoPtr->Font != 0) DeleteObject(infoPtr->Font);
#endif
if(infoPtr->LinkFont != 0) DeleteObject(infoPtr->LinkFont);
SetWindowLongPtrW(hwnd, 0, 0);
Free (infoPtr);