mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
check for null resultdata data at third party intents
This commit is contained in:
@@ -269,7 +269,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
|
||||||
if (resultCode == Activity.RESULT_OK) {
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
if (requestCode == PICK_MEDIA && resultData != null) {
|
if (requestCode == PICK_MEDIA && resultData?.data != null) {
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
val path = resultData.data.path
|
val path = resultData.data.path
|
||||||
val uri = Uri.fromFile(File(path))
|
val uri = Uri.fromFile(File(path))
|
||||||
|
Reference in New Issue
Block a user