Skip to content

Commit f8b2edb

Browse files
committed
add a null check at ReadTextActivity
1 parent 3c88cbf commit f8b2edb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/activities/ReadTextActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ class ReadTextActivity : SimpleActivity() {
6565
private fun checkIntent() {
6666
read_text_view.setTextColor(config.textColor)
6767
val uri = intent.data
68+
if (uri == null) {
69+
finish()
70+
return
71+
}
72+
6873
val text = if (uri.scheme == "file") {
6974
filePath = uri.path
7075
File(uri.path).readText()

0 commit comments

Comments
 (0)