2
0
Fork 1
mirror of https://github.com/FossifyOrg/Gallery.git synced 2025-04-21 02:44:00 +02:00

add a null check at getting current path

This commit is contained in:
tibbi 2018-07-30 12:31:54 +02:00
parent 7b2af9faeb
commit 1567ca05fb

View file

@ -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())