Skip to content

Commit e24a41d

Browse files
committed
adding a crashfix
1 parent d36246d commit e24a41d

File tree

1 file changed

+6
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/notes/pro/activities

1 file changed

+6
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,12 @@ class MainActivity : SimpleActivity() {
561561
}
562562

563563
private fun checkUri(uri: Uri, onChecksPassed: () -> Unit) {
564-
val inputStream = contentResolver.openInputStream(uri) ?: return
564+
val inputStream = try {
565+
contentResolver.openInputStream(uri) ?: return
566+
} catch (e: Exception) {
567+
return
568+
}
569+
565570
if (inputStream.available() > 1000 * 1000) {
566571
toast(R.string.file_too_large)
567572
} else {

0 commit comments

Comments
 (0)