Allow passing NULL for file to FcFreeTypeQueryFace()
This commit is contained in:
parent
3f992254f2
commit
58acd993cb
|
@ -1321,7 +1321,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
|||
++nstyle;
|
||||
}
|
||||
|
||||
if (!nfamily)
|
||||
if (!nfamily && file && *file)
|
||||
{
|
||||
FcChar8 *start, *end;
|
||||
FcChar8 *family;
|
||||
|
@ -1395,7 +1395,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
|||
if (!FcPatternAddString (pat, FC_POSTSCRIPT_NAME, (const FcChar8 *)psname))
|
||||
goto bail1;
|
||||
|
||||
if (!FcPatternAddString (pat, FC_FILE, file))
|
||||
if (file && *file && !FcPatternAddString (pat, FC_FILE, file))
|
||||
goto bail1;
|
||||
|
||||
if (!FcPatternAddInteger (pat, FC_INDEX, id))
|
||||
|
|
Loading…
Reference in New Issue