mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-31 12:16:44 +01:00
adding a null check at selecting directories
This commit is contained in:
parent
d42e0005b5
commit
0dba5114a1
1 changed files with 5 additions and 1 deletions
|
@ -436,7 +436,11 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
|
||||
private fun getSelectedPaths(): HashSet<String> {
|
||||
val paths = HashSet<String>(selectedPositions.size)
|
||||
selectedPositions.forEach { paths.add(dirs[it].path) }
|
||||
selectedPositions.forEach {
|
||||
(dirs.getOrNull(it))?.apply {
|
||||
paths.add(path)
|
||||
}
|
||||
}
|
||||
return paths
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue