Remember to remove a child font from the child font list.
diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c
index ca89616..eb46928 100644
--- a/dlls/gdi/freetype.c
+++ b/dlls/gdi/freetype.c
@@ -2377,6 +2377,18 @@
struct list *font_elem_ptr, *hfontlist_elem_ptr;
int i = 0;
+ LIST_FOR_EACH_ENTRY(gdiFont, &child_font_list, struct tagGdiFont, entry)
+ {
+ struct list *first_hfont = list_head(&gdiFont->hfontlist);
+ hflist = LIST_ENTRY(first_hfont, HFONTLIST, entry);
+ if(hflist->hfont == handle)
+ {
+ TRACE("removing child font %p from child list\n", gdiFont);
+ list_remove(&gdiFont->entry);
+ return TRUE;
+ }
+ }
+
TRACE("destroying hfont=%p\n", handle);
if(TRACE_ON(font))
dump_gdi_font_list();