mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-05 12:58:27 +01:00
add a null check at ReadTextActivity
This commit is contained in:
parent
3c88cbfbee
commit
f8b2edba7e
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user