Made it so that the font collector does not crash Aegisub when it is built with both no freetype and no fontconfig.
Originally committed to SVN as r3252.
This commit is contained in:
parent
83bb2ecedd
commit
e21337f34f
2 changed files with 9 additions and 4 deletions
|
@ -589,7 +589,7 @@ bool FontsCollectorThread::AttachFont(wxString filename) {
|
||||||
// Get fonts from ass overrides
|
// Get fonts from ass overrides
|
||||||
void FontsCollectorThread::GetFonts (wxString tagName,int par_n,AssOverrideParameter *param,void *usr) {
|
void FontsCollectorThread::GetFonts (wxString tagName,int par_n,AssOverrideParameter *param,void *usr) {
|
||||||
if (tagName == _T("\\fn")) {
|
if (tagName == _T("\\fn")) {
|
||||||
instance->AddFont(param->AsText(),1);
|
if (instance) instance->AddFont(param->AsText(),1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,15 +85,20 @@ void FontFileLister::GetInstance() {
|
||||||
// Redirect statics to the instance
|
// Redirect statics to the instance
|
||||||
wxArrayString FontFileLister::GetFilesWithFace(wxString facename) {
|
wxArrayString FontFileLister::GetFilesWithFace(wxString facename) {
|
||||||
GetInstance();
|
GetInstance();
|
||||||
|
if (instance)
|
||||||
return instance->DoGetFilesWithFace(facename);
|
return instance->DoGetFilesWithFace(facename);
|
||||||
|
else {
|
||||||
|
wxArrayString ret;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void FontFileLister::Initialize() {
|
void FontFileLister::Initialize() {
|
||||||
GetInstance();
|
GetInstance();
|
||||||
instance->DoInitialize();
|
if (instance) instance->DoInitialize();
|
||||||
}
|
}
|
||||||
void FontFileLister::ClearData() {
|
void FontFileLister::ClearData() {
|
||||||
GetInstance();
|
GetInstance();
|
||||||
instance->DoClearData();
|
if (instance) instance->DoClearData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue