add an activity check at filling items

This commit is contained in:
tibbi 2017-08-07 21:59:30 +02:00
parent 592eb7bb53
commit 9d81c1a667

View file

@ -3,6 +3,7 @@ package com.simplemobiletools.filemanager.fragments
import android.content.ActivityNotFoundException import android.content.ActivityNotFoundException
import android.content.Intent import android.content.Intent
import android.net.Uri import android.net.Uri
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.os.Parcelable import android.os.Parcelable
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
@ -72,6 +73,9 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener {
} }
fun fillItems() { fun fillItems() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && activity.isDestroyed)
return
mPath = arguments.getString(PATH) mPath = arguments.getString(PATH)
getItems(mPath) { getItems(mPath) {
val newItems = it val newItems = it