Fix fonts collector crash when the font isn't found

This commit is contained in:
Thomas Goyne 2012-12-28 07:32:55 -08:00
parent 9955a2c39d
commit 87e60bca2a
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(wxString
FcResult result;
FcFontSet *sets[] = { (FcFontSet*)fset };
agi::scoped_holder<FcPattern*> match(FcFontSetMatch(config, sets, 1, pat, &result), FcPatternDestroy);
if (!match)
return ret;
FcChar8 *file;
if(FcPatternGetString(match, FC_FILE, 0, &file) != FcResultMatch)