From a73bf966b498debe01d74bf61ecd5e24f7e9fc9c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Apr 2022 15:07:23 +0200 Subject: [PATCH] adding a crashfix --- .../gallery/pro/activities/ViewPagerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt index c0e7984b4..76000f091 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt @@ -1179,7 +1179,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } RenameItemDialog(this, oldPath) { - getCurrentMedia()[mPos].apply { + getCurrentMedia().getOrNull(mPos)?.apply { path = it name = it.getFilenameFromPath() }