diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index daec3c8cc..3ef268ecf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -40,7 +40,7 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList, fun toggleItemSelection(select: Boolean, pos: Int) { if (select) { - itemViews[pos].medium_check.background.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN) + itemViews[pos]?.medium_check?.background?.setColorFilter(primaryColor, PorterDuff.Mode.SRC_IN) selectedPositions.add(pos) } else selectedPositions.remove(pos)