Fix a crash when the object is non-builtin object

This commit is contained in:
Akira TAGOH 2013-03-01 19:38:21 +09:00
parent 1023049767
commit ea4ebd5937
1 changed files with 2 additions and 1 deletions

View File

@ -269,7 +269,8 @@ FcObjectToMatcher (FcObject object,
break;
}
}
if (!_FcMatchers[object].compare ||
if (object > FC_MAX_BASE_OBJECT ||
!_FcMatchers[object].compare ||
_FcMatchers[object].strong == -1 ||
_FcMatchers[object].weak == -1)
return NULL;