Fix a crash when FcPattern is set to null on FcFontSetList() and FcFontList()

This commit is contained in:
Akira TAGOH 2013-09-24 11:14:57 +09:00
parent 643f8088f0
commit 8a174b6c51
1 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,8 @@ FcListPatternMatchAny (const FcPattern *p,
{ {
int i; int i;
if (!p)
return FcFalse;
for (i = 0; i < p->num; i++) for (i = 0; i < p->num; i++)
{ {
FcPatternElt *pe = &FcPatternElts(p)[i]; FcPatternElt *pe = &FcPatternElts(p)[i];