diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 6318293ae..fb809047b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -91,8 +91,14 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View cursor?.close() } } else { - mPath = intent.getStringExtra(MEDIUM) - mShowAll = config.showAll + try { + mPath = intent.getStringExtra(MEDIUM) + mShowAll = config.showAll + } catch (e: Exception) { + showErrorToast(e) + finish() + return + } } if (mPath.isEmpty()) {