Skip to content

Commit a1dfa5e

Browse files
Handle nullable file URIs
1 parent 096a914 commit a1dfa5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/kotlin/com/d4rk/cleaner/app/images/compressor/domain/usecases/GetRealFileFromUriUseCase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class GetRealFileFromUriUseCase(private val context: Context) {
2626
}
2727
}
2828
} else if (uri.scheme == "file") {
29-
return@runCatching File(uri.path!!)
29+
uri.path?.let { return@runCatching File(it) }
3030
}
3131
null
3232
}
3333
}
34-
}
34+
}

0 commit comments

Comments
 (0)