mirror of https://github.com/odrling/Aegisub
Fix fonts collector crash when the font isn't found
This commit is contained in:
parent
9955a2c39d
commit
87e60bca2a
|
@ -124,6 +124,8 @@ FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(wxString
|
||||||
FcResult result;
|
FcResult result;
|
||||||
FcFontSet *sets[] = { (FcFontSet*)fset };
|
FcFontSet *sets[] = { (FcFontSet*)fset };
|
||||||
agi::scoped_holder<FcPattern*> match(FcFontSetMatch(config, sets, 1, pat, &result), FcPatternDestroy);
|
agi::scoped_holder<FcPattern*> match(FcFontSetMatch(config, sets, 1, pat, &result), FcPatternDestroy);
|
||||||
|
if (!match)
|
||||||
|
return ret;
|
||||||
|
|
||||||
FcChar8 *file;
|
FcChar8 *file;
|
||||||
if(FcPatternGetString(match, FC_FILE, 0, &file) != FcResultMatch)
|
if(FcPatternGetString(match, FC_FILE, 0, &file) != FcResultMatch)
|
||||||
|
|
Loading…
Reference in New Issue