add a null check to viewpager menu items
This commit is contained in:
parent
f728ca2650
commit
5a625a3388
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue