]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid crashes on MS-Windows on repeated client connections
authorEli Zaretskii <eliz@gnu.org>
Mon, 3 Mar 2025 19:29:45 +0000 (21:29 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Mar 2025 21:04:45 +0000 (22:04 +0100)
* src/w32uniscribe.c (uniscribe_close): Zero out dwrite cache.
Suggested by Richard Copley <rcopley@gmail.com>.  (Bug#76121)

(cherry picked from commit c116dad608afcf28384651101e8b6c6b7999f56e)

src/w32uniscribe.c

index 9986c9dc2f91efc5e88c7f18a06820680cc0b3c9..b412be6f2e16db25c4dcb5f201e03a9fc55b0c3c 100644 (file)
@@ -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);