correcting a check at getting current medium at viewpager

This commit is contained in:
tibbi 2017-06-06 22:26:35 +02:00
parent e98de74ae4
commit 6dc1323252
1 changed files with 1 additions and 1 deletions

View File

@ -509,7 +509,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun getCurrentMedium(): Medium? {
return if (mMedia.isEmpty() || mPos >= mMedia.size)
return if (mMedia.isEmpty() || mPos == -1)
null
else
mMedia[Math.min(mPos, mMedia.size - 1)]