gdi32: Ensure child fonts have names

Dmitry Timoshkov dmitry at codeweavers.com
Fri Jul 31 07:54:14 CDT 2009


"Aric Stewart" <aric at codeweavers.com> wrote:

> @@ -5792,6 +5792,9 @@ static BOOL load_child_font(GdiFont *font, CHILD_FONT *child)
>     child->font->scale_y = font->scale_y;
>     hfontlist = HeapAlloc(GetProcessHeap(), 0, sizeof(*hfontlist));
>     hfontlist->hfont = CreateFontIndirectW(&font->font_desc.lf);
> +    /* ensure the child font has a name */
> +    if (!child->font->name)
> +        child->font->name = strdupW(child->font->font_desc.lf.lfFaceName);

It doesn't look like an appropriate place for this. Font name is initialized
explicitly in both WineEngCreateFontInstance() and GetEnumStructs(). How it
could be possible that it's NULL in the above case?

-- 
Dmitry.




More information about the wine-devel mailing list