diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index 56e39f852..facded0d6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -136,6 +136,9 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList } override fun onOptionsItemSelected(item: MenuItem): Boolean { + if (mMedium == null) + return true + when (item.itemId) { R.id.menu_set_as_wallpaper -> trySetAsWallpaper(File(mMedium!!.path)) R.id.menu_open_with -> openWith(File(mMedium!!.path))