From 876f81c0e7a0e4738200c5e933c30601ced08d41 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 15 Jan 2017 11:59:47 +0100 Subject: [PATCH] add a null check before displaying properties dialog --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 45f4a00d2..06d0a1108 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -141,7 +141,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } private fun showProperties() { - PropertiesDialog(this, getCurrentFile().absolutePath, false) + if (getCurrentMedium() != null) + PropertiesDialog(this, getCurrentMedium()!!.path, false) } override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {