make resultData.data nullable at pick intent result

This commit is contained in:
tibbi 2017-11-09 17:23:47 +01:00
parent f374cfde67
commit 3e7d4b6f5b
1 changed files with 1 additions and 1 deletions

View File

@ -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