adding a crashfix

This commit is contained in:
tibbi 2019-06-21 21:57:54 +02:00
parent 3a520b427d
commit 5c2c057c83
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ import com.simplemobiletools.filemanager.pro.interfaces.ItemOperationsListener
import com.simplemobiletools.filemanager.pro.models.ListItem
import kotlinx.android.synthetic.main.items_fragment.view.*
import java.io.File
import java.util.HashMap
import java.util.*
import kotlin.collections.ArrayList
class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.BreadcrumbsListener {
@ -294,7 +294,7 @@ class ItemsFragment : Fragment(), ItemOperationsListener, Breadcrumbs.Breadcrumb
var previousParent = ""
files.forEach {
val parent = it.mPath.getParentPath()
if (parent != previousParent) {
if (parent != previousParent && context != null) {
listItems.add(ListItem("", context!!.humanizePath(parent), false, 0, 0, 0, true))
previousParent = parent
}