Avoid crashes on MS-Windows on repeated client connections

* src/w32uniscribe.c (uniscribe_close): Zero out dwrite cache.
Suggested by Richard Copley <rcopley@gmail.com>.  (Bug#76121)
This commit is contained in:
Eli Zaretskii 2025-03-03 21:29:45 +02:00
parent 1ec0889e7b
commit c116dad608

View 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);