From: Eli Zaretskii Date: Mon, 3 Mar 2025 19:29:45 +0000 (+0200) Subject: Avoid crashes on MS-Windows on repeated client connections X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87740c10a579ae04c636351249b13fb51bce969e;p=emacs.git 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) --- 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);