From 9e5aa1a9f95a3b5541aba7e511e13ae51b614416 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 6 Sep 2017 14:33:47 +0200 Subject: Do not crash on unreadable config. dir --- app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt index 6ef8974..3163f0a 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt @@ -68,7 +68,7 @@ class StartActivity : BaseActivity(), AdapterView.OnItemClickListener, SwipeRefr } override fun onRefresh() { - val networks = AppPaths.confDir().list().toList() + val networks = AppPaths.confDir().list()?.toList() ?: emptyList() runOnUiThread { networkListAdapter?.setElements(networks) network_list_placeholder.visibility = if (networkListAdapter?.isEmpty ?: true) View.VISIBLE else View.GONE -- cgit v1.2.3