mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
work around NPE by defaulting to English
Somehow getLangIsoCode() is returning null when called early in app launch, on some subset of devices the Play Store isn't identifying. I'm just going to default to "en" when that happens.
This commit is contained in:
parent
4ab88eb572
commit
bab96c4528
1 changed files with 3 additions and 0 deletions
|
@ -54,6 +54,9 @@ public class DictListPreference extends XWListPreference {
|
|||
curLang = LocUtils.getString( context, R.string.lang_name_english );
|
||||
}
|
||||
ISOCode isoCode = DictLangCache.getLangIsoCode( context, curLang );
|
||||
if ( null == isoCode ) { // work around crash reported via Play Store
|
||||
isoCode = Utils.ISO_EN;
|
||||
}
|
||||
|
||||
DictUtils.DictAndLoc[] dals = DictUtils.dictList( context );
|
||||
ArrayList<String> dictEntries = new ArrayList<>();
|
||||
|
|
Loading…
Reference in a new issue