do not try opening any path if the fragment is gone

This commit is contained in:
tibbi 2017-10-29 10:45:54 +01:00
parent 30bd5dc250
commit 3c88cbfbee

View file

@ -83,6 +83,10 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum
} }
fun openPath(path: String) { fun openPath(path: String) {
if (!isAdded) {
return
}
var realPath = path.trimEnd('/') var realPath = path.trimEnd('/')
if (realPath.isEmpty()) if (realPath.isEmpty())
realPath = "/" realPath = "/"