Skip to content

Commit

Permalink
adding a null check at getting files
Browse files Browse the repository at this point in the history
  • Loading branch information
tibbi committed Dec 28, 2017
1 parent 69f091d commit 193091f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum

private fun getRegularItemsOf(path: String, callback: (items: ArrayList<FileDirItem>) -> Unit) {
val items = ArrayList<FileDirItem>()
val files = File(path).listFiles()
val files = File(path).listFiles()?.filterNotNull()
if (files != null) {
for (file in files) {
val curPath = file.absolutePath
Expand Down

0 comments on commit 193091f

Please sign in to comment.