From de93f49ae88743cc6b58703553a1a4559db03ae7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 7 Aug 2018 14:25:20 +0200 Subject: [PATCH] adding a crashfix --- .../simplemobiletools/filemanager/fragments/ItemsFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt index 1f3a6994..5c8091f1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt @@ -191,11 +191,11 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb private fun getRegularItemsOf(path: String, callback: (originalPath: String, items: ArrayList) -> Unit) { val items = ArrayList() + val files = File(path).listFiles()?.filterNotNull() if (context == null) { callback(path, items) } - val files = File(path).listFiles()?.filterNotNull() val isSortingBySize = context!!.config.sorting and SORT_BY_SIZE != 0 if (files != null) { for (file in files) {