mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
add a null check at getting current path
This commit is contained in:
parent
7b2af9faeb
commit
1567ca05fb
1 changed files with 1 additions and 1 deletions
|
@ -1104,7 +1104,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun getCurrentMedia() = if (mAreSlideShowMediaVisible) mSlideshowMedia else mMediaFiles
|
||||
|
||||
private fun getCurrentPath() = getCurrentMedium()!!.path
|
||||
private fun getCurrentPath() = getCurrentMedium()?.path ?: ""
|
||||
|
||||
private fun getCurrentFile() = File(getCurrentPath())
|
||||
|
||||
|
|
Loading…
Reference in a new issue