Prevent crash on pause for Media Preview with no fragments.
This commit is contained in:
parent
9846517075
commit
3f160f256a
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class MediaPreviewV2Adapter(fragment: Fragment) : FragmentStateAdapter(fragment)
|
|||
}
|
||||
|
||||
fun getFragmentTag(position: Int): String? {
|
||||
if (position < 0 || position > itemCount) {
|
||||
if (items.isEmpty() || position < 0 || position > itemCount) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue