mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-03-21 19:27:14 +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> {
|
private fun getSelectedPaths(): HashSet<String> {
|
||||||
val paths = HashSet<String>(selectedPositions.size)
|
val paths = HashSet<String>(selectedPositions.size)
|
||||||
selectedPositions.forEach { paths.add(dirs[it].path) }
|
selectedPositions.forEach {
|
||||||
|
(dirs.getOrNull(it))?.apply {
|
||||||
|
paths.add(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
return paths
|
return paths
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue