aboutsummaryrefslogtreecommitdiff
path: root/taler-kotlin-android
diff options
context:
space:
mode:
Diffstat (limited to 'taler-kotlin-android')
-rw-r--r--taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
index bb2e78a..e75e4c8 100644
--- a/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
+++ b/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
@@ -29,8 +29,8 @@ object TalerUtils {
// create a priority list of language ranges from system locales
val locales = LocaleListCompat.getDefault()
val priorityList = ArrayList<Locale.LanguageRange>(locales.size())
- for (i in 0 until locales.size()) {
- priorityList.add(Locale.LanguageRange(locales[i].toLanguageTag()))
+ for (i in 0 until locales.size()) locales[i]?.let { locale ->
+ priorityList.add(Locale.LanguageRange(locale.toLanguageTag()))
}
// create a list of locales available in the given map
val availableLocales = map.keys.mapNotNull {