From 0846c21711a78be58b3c90af21d3d460fb59355f Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 28 Mar 2019 22:08:00 +0100 Subject: [PATCH] adding an extra check at third party intents about file existance --- .../gallery/pro/activities/PhotoVideoActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index 1a9f62a45..049576f24 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -95,7 +95,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList if (intent.extras?.containsKey(REAL_FILE_PATH) == true) { val realPath = intent.extras!!.getString(REAL_FILE_PATH) - if (realPath != null) { + if (realPath != null && File(realPath).exists()) { if (realPath.getFilenameFromPath().contains('.') || filename.contains('.')) { sendViewPagerIntent(realPath) finish()