diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/ReadTextActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/ReadTextActivity.kt index 4a532272..b6267b52 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/ReadTextActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/ReadTextActivity.kt @@ -65,6 +65,11 @@ class ReadTextActivity : SimpleActivity() { private fun checkIntent() { read_text_view.setTextColor(config.textColor) val uri = intent.data + if (uri == null) { + finish() + return + } + val text = if (uri.scheme == "file") { filePath = uri.path File(uri.path).readText()