mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 05:17:42 +01:00
Prevent NPE, load Korean font if it exists (#802)
Co-authored-by: goaaats <goatsdev@protonmail.com>
This commit is contained in:
parent
0b6417fd7c
commit
2a36122c2c
4 changed files with 88 additions and 30 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue