From 21d3e290b79bbc830f92b8109f9051e88964c2ce Mon Sep 17 00:00:00 2001 From: Mohammad Amin Mollazadeh Date: Sun, 4 May 2025 02:44:24 +0330 Subject: [PATCH] [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 https://github.com/wine-mirror/wine/commit/480598680ceb86661bd269b7a64bd90e38a40f98 Fixes deleting system font object when destroying syslink. CORE-20127 --- dll/win32/comctl32/syslink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dll/win32/comctl32/syslink.c b/dll/win32/comctl32/syslink.c index a00ef9e4a3a..e062c13f7fc 100644 --- a/dll/win32/comctl32/syslink.c +++ b/dll/win32/comctl32/syslink.c @@ -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);