mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
adding a null check at selecting directories
This commit is contained in:
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user