mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 07:13:49 +01:00
Bug1288: Don't crash when changing language to "Simplified"...
... but give a warning message about the unknown language.
This commit is contained in:
@@ -166,9 +166,12 @@ bool GUIPrefs::Apply()
|
||||
|
||||
// If language has changed, we want to change it now, not on the next reboot.
|
||||
wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT(""));
|
||||
if (lang == wxT(""))
|
||||
lang = GetSystemLanguageCode();
|
||||
wxGetApp().InitLang(lang);
|
||||
wxString usedLang = wxGetApp().InitLang(lang);
|
||||
if (lang != usedLang) {
|
||||
// lang was not usable. We got overridden.
|
||||
gPrefs->Write(wxT("/Locale/Language"), usedLang);
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user