Fix a crash when no objects are available after filtering

This commit is contained in:
Akira TAGOH 2015-06-09 11:15:06 +09:00
parent 10a57edd07
commit 359ada2b4c
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ FcPatternPrint2 (FcPattern *pp1,
{ {
e1 = &FcPatternElts(p1)[i]; e1 = &FcPatternElts(p1)[i];
e2 = &FcPatternElts(p2)[j]; e2 = &FcPatternElts(p2)[j];
if (e1->object != e2->object) if (!e2 || e1->object != e2->object)
{ {
pos = FcPatternPosition (p2, FcObjectName (e1->object)); pos = FcPatternPosition (p2, FcObjectName (e1->object));
if (pos >= 0) if (pos >= 0)