Fix a SIGSEGV on FcPatternGet* with NULL pattern

This commit is contained in:
Akira TAGOH 2013-03-21 11:58:06 +09:00
parent bdf1581e3d
commit c758206e8c
1 changed files with 2 additions and 0 deletions

View File

@ -843,6 +843,8 @@ FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v)
FcPatternElt *e;
FcValueListPtr l;
if (!p)
return FcResultNoMatch;
e = FcPatternObjectFindElt (p, object);
if (!e)
return FcResultNoMatch;