From fe7f1a1b38d13f926baf05d19d5d99100dae9eff Mon Sep 17 00:00:00 2001 From: Helium314 Date: Mon, 14 Apr 2025 17:06:34 +0200 Subject: [PATCH] fix crash when deleting subtype fixes GH-1476 --- .../main/java/helium314/keyboard/latin/utils/LayoutType.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/helium314/keyboard/latin/utils/LayoutType.kt b/app/src/main/java/helium314/keyboard/latin/utils/LayoutType.kt index 412bb158..00db72c8 100644 --- a/app/src/main/java/helium314/keyboard/latin/utils/LayoutType.kt +++ b/app/src/main/java/helium314/keyboard/latin/utils/LayoutType.kt @@ -13,9 +13,9 @@ enum class LayoutType { companion object { fun EnumMap.toExtraValue() = map { it.key.name + Separators.KV + it.value }.joinToString(Separators.ENTRY) - fun getLayoutMap(string: String): EnumMap { + fun getLayoutMap(string: String?): EnumMap { val map = EnumMap(LayoutType::class.java) - string.split(Separators.ENTRY).forEach { + string?.split(Separators.ENTRY)?.forEach { val s = it.split(Separators.KV) runCatching { map[LayoutType.valueOf(s[0])] = s[1] } }