diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index f04462378..bb02480c3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -534,7 +534,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { private fun columnCountChanged() { invalidateOptionsMenu() directories_grid.adapter?.notifyDataSetChanged() - measureRecyclerViewContent(getRecyclerAdapter()!!.dirs) + getRecyclerAdapter()?.dirs?.apply { + measureRecyclerViewContent() + } } private fun isPickImageIntent(intent: Intent) = isPickIntent(intent) && (hasImageContentData(intent) || isImageType(intent))