diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index df2a26d68..4a0eb5350 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -100,6 +100,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } override fun onOptionsItemSelected(item: MenuItem): Boolean { + if (getCurrentMedium() == null) + return true + when (item.itemId) { R.id.menu_set_as_wallpaper -> setAsWallpaper(getCurrentFile()) R.id.menu_copy_move -> displayCopyDialog()