forked from mia/Aegisub
Fix font collector crash
Originally committed to SVN as r4823.
This commit is contained in:
parent
7189dfb1a1
commit
4af788be1a
2 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ wxArrayString FontConfigFontFileLister::DoGetFilesWithFace(wxString facename) {
|
|||
if (FcPatternGetString(final, FC_FILE, 0, &filename) == FcResultMatch && FcPatternGetInteger(final, FC_INDEX, 0, &fontindex) == FcResultMatch) {
|
||||
FcPatternGetString(final, FC_FAMILY, fontindex, &gotfamily);
|
||||
if (strcmp((const char*)gotfamily,buffer) == 0) {
|
||||
results.Add(wxString((char*) filename,csConvLocal));
|
||||
results.Add(wxString((char*) filename));
|
||||
}
|
||||
}
|
||||
FcPatternDestroy(final);
|
||||
|
|
|
@ -93,7 +93,7 @@ wxArrayString GetName(FT_Face &face,int id) {
|
|||
memcpy(str,name.string,name.string_len);
|
||||
str[name.string_len] = 0;
|
||||
str[name.string_len+1] = 0;
|
||||
if (name.encoding_id == 0) final.Add(wxString(str, csConvLocal));
|
||||
if (name.encoding_id == 0) final.Add(wxString(str));
|
||||
else if (name.encoding_id == 1) {
|
||||
wxMBConvUTF16BE conv;
|
||||
wxString string(str,conv);
|
||||
|
|
Loading…
Reference in a new issue