diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt index 05320aa7..1397bcb8 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/TetherType.kt @@ -46,7 +46,12 @@ enum class TetherType(@DrawableRes val icon: Int) { if (it == 0) { if (name == "config_tether_wigig_regexs") Timber.i("$name is empty") else Timber.w(Exception(name)) emptyList() - } else second.getStringArray(it).filterNotNull().map { it.toPattern() } + } else try { + second.getStringArray(it).filterNotNull().map { it.toPattern() } + } catch (_: Resources.NotFoundException) { + Timber.w(Exception("$name not found")) + emptyList() + } } @RequiresApi(30)