Skip to content

Commit 37122c8

Browse files
committed
npe check
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent f860f00 commit 37122c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/java/it/niedermann/owncloud/notes/persistence/DirectEditingRepository.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class DirectEditingRepository private constructor(private val applicationContext
4040
return notesPath
4141
.flatMap { notesPath ->
4242
val filesAPI = apiProvider.getFilesAPI(applicationContext, account)
43+
if (filesAPI == null) {
44+
return@flatMap null
45+
}
46+
4347
Single.fromCallable {
4448
val call =
4549
filesAPI.getDirectEditingUrl(

0 commit comments

Comments
 (0)