From 28f7d4eb6c99a9337a9b9cb9e0529a956d04d39a Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 21 Jun 2018 09:06:25 +0200 Subject: [PATCH] adding some null checks --- .../gallery/activities/PhotoVideoActivity.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index 516b24a16..912f7541b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -182,11 +182,15 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList bottom_delete.beGone() bottom_edit.setOnClickListener { - openEditor(mUri!!.toString()) + if (mUri != null) { + openEditor(mUri!!.toString()) + } } bottom_share.setOnClickListener { - sharePath(mUri!!.toString()) + if (mUri != null) { + sharePath(mUri!!.toString()) + } } }