From 3c88cbfbee8f52c9e55f0016934afd7e99041f3a Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 29 Oct 2017 10:45:54 +0100 Subject: [PATCH] do not try opening any path if the fragment is gone --- .../simplemobiletools/filemanager/fragments/ItemsFragment.kt | 4 ++++ 1 file changed, 4 insertions(+) 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 0a37808b..e064e065 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt @@ -83,6 +83,10 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum } fun openPath(path: String) { + if (!isAdded) { + return + } + var realPath = path.trimEnd('/') if (realPath.isEmpty()) realPath = "/"