Dmitry Timoshkov : gdi32: Go through all hfontlist entries not just the first one when checking whether font is in the child font list .
Module: wine Branch: master Commit: 20bdd203aa82c3a20dbc4ffe4c5d93474a784fd3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=20bdd203aa82c3a20dbc4ffe4c... Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Mon Feb 21 18:20:59 2011 +0800 gdi32: Go through all hfontlist entries not just the first one when checking whether font is in the child font list. --- dlls/gdi32/freetype.c | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index e0a93f8..edddde1 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -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; + } } }
participants (1)
-
Alexandre Julliard