Prevent NPE, load Korean font if it exists (#802)

Co-authored-by: goaaats <goatsdev@protonmail.com>
This commit is contained in:
kizer 2022-04-23 23:42:44 +09:00 committed by GitHub
parent 0b6417fd7c
commit 2a36122c2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 88 additions and 30 deletions

View file

@ -134,26 +134,9 @@ namespace Dalamud.Interface.Internal.Windows
};
this.languages = Localization.ApplicableLangCodes.Prepend("en").ToArray();
try
{
if (string.IsNullOrEmpty(configuration.LanguageOverride))
{
var currentUiLang = CultureInfo.CurrentUICulture;
if (Localization.ApplicableLangCodes.Any(x => currentUiLang.TwoLetterISOLanguageName == x))
this.langIndex = Array.IndexOf(this.languages, currentUiLang.TwoLetterISOLanguageName);
else
this.langIndex = 0;
}
else
{
this.langIndex = Array.IndexOf(this.languages, configuration.LanguageOverride);
}
}
catch (Exception)
{
this.langIndex = Array.IndexOf(this.languages, configuration.EffectiveLanguage);
if (this.langIndex == -1)
this.langIndex = 0;
}
try
{