Commit 20bdd203 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: Go through all hfontlist entries not just the first one when checking…

gdi32: Go through all hfontlist entries not just the first one when checking whether font is in the child font list.
parent 00c8250f
......@@ -3908,14 +3908,16 @@ BOOL WineEngDestroyFontInstance(HFONT handle)
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);
LeaveCriticalSection( &freetype_cs );
return TRUE;
hfontlist_elem_ptr = list_head(&gdiFont->hfontlist);
while(hfontlist_elem_ptr) {
hflist = LIST_ENTRY(hfontlist_elem_ptr, struct tagHFONTLIST, entry);
hfontlist_elem_ptr = list_next(&gdiFont->hfontlist, hfontlist_elem_ptr);
if(hflist->hfont == handle) {
TRACE("removing child font %p from child list\n", gdiFont);
list_remove(&gdiFont->entry);
LeaveCriticalSection( &freetype_cs );
return TRUE;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment