From 3e7d4b6f5b39fa0671733e622c3694be32fe4dc4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 9 Nov 2017 17:23:47 +0100 Subject: [PATCH] make resultData.data nullable at pick intent result --- .../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 013311afc..ef0a5ffad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -451,7 +451,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { else -> fillIntentPath(resultData, resultIntent) } } else if ((mIsPickImageIntent || mIsPickVideoIntent)) { - val path = resultData.data.path + val path = resultData.data?.path val uri = getFilePublicUri(File(path), BuildConfig.APPLICATION_ID) resultIntent.data = uri resultIntent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION