diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt index a1f261bd..ab6546af 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/ReadTextActivity.kt @@ -204,6 +204,9 @@ class ReadTextActivity : SimpleActivity() { } else { try { contentResolver.openInputStream(uri)!!.bufferedReader().use { it.readText() } + } catch (e: OutOfMemoryError) { + showErrorToast(e.toString()) + return@ensureBackgroundThread } catch (e: Exception) { showErrorToast(e) finish()