Remember to remove a child font from the child font list.

oldstable
Huw Davies 2005-09-15 09:29:37 +00:00 committed by Alexandre Julliard
parent 8aba0897bd
commit d64172dc5e
1 changed files with 12 additions and 0 deletions

View File

@ -2377,6 +2377,18 @@ BOOL WineEngDestroyFontInstance(HFONT handle)
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();