From 4e9e491f135971fc69a52c53f41227d0a5f8c513 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 12 Apr 2017 23:32:54 +0200 Subject: [PATCH] check for null resultdata data at third party intents --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index fd8d064f7..e336d0fca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -269,7 +269,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { if (resultCode == Activity.RESULT_OK) { - if (requestCode == PICK_MEDIA && resultData != null) { + if (requestCode == PICK_MEDIA && resultData?.data != null) { Intent().apply { val path = resultData.data.path val uri = Uri.fromFile(File(path))