From 87740c10a579ae04c636351249b13fb51bce969e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 3 Mar 2025 21:29:45 +0200 Subject: [PATCH] Avoid crashes on MS-Windows on repeated client connections * src/w32uniscribe.c (uniscribe_close): Zero out dwrite cache. Suggested by Richard Copley . (Bug#76121) (cherry picked from commit c116dad608afcf28384651101e8b6c6b7999f56e) --- src/w32uniscribe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 9986c9dc2f9..b412be6f2e1 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -204,6 +204,7 @@ uniscribe_close (struct font *font) #ifdef HAVE_HARFBUZZ w32_dwrite_free_cached_face (uniscribe_font->dwrite_cache); + uniscribe_font->dwrite_cache = NULL; if (uniscribe_font->w32_font.font.driver == &harfbuzz_font_driver && uniscribe_font->cache) hb_font_destroy ((hb_font_t *) uniscribe_font->cache); -- 2.39.5