aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorpacien2018-09-25 22:37:01 +0200
committerpacien2018-09-25 22:37:01 +0200
commitc9b813a2c8fcd53543c7aa84a773915d2c7c07d1 (patch)
tree9bdd5583eae8fd841917811efb19e9e87f5bf15c /app
parent5f1d871e136b979278399c811ae7e3e0872a277f (diff)
downloadtincapp-c9b813a2c8fcd53543c7aa84a773915d2c7c07d1.tar.gz
Properly handle null list
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt b/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt
index 568714e..2956cb4 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/status/networkinfo/VpnInterfaceConfigurationFormatter.kt
@@ -28,8 +28,8 @@ import org.pacien.tincapp.data.CidrAddress
28object VpnInterfaceConfigurationFormatter { 28object VpnInterfaceConfigurationFormatter {
29 private val resources by lazy { App.getResources() } 29 private val resources by lazy { App.getResources() }
30 30
31 fun formatList(list: List<Any>) = when { 31 fun formatList(list: List<Any>?) = when {
32 list.isNotEmpty() -> list.joinToString("\n", transform = this::formatListElement) 32 list != null && list.isNotEmpty() -> list.joinToString("\n", transform = this::formatListElement)
33 else -> resources.getString(R.string.status_network_info_value_none)!! 33 else -> resources.getString(R.string.status_network_info_value_none)!!
34 } 34 }
35 35