From 1adcb6e33b8d39ef8eab5a37c5b0e1b5eaa5631e Mon Sep 17 00:00:00 2001 From: Tuomas Airaksinen Date: Mon, 6 Nov 2023 09:24:55 +0200 Subject: [PATCH] Fix crash --- .../java/net/bible/android/control/backup/BackupControl.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/bible/android/control/backup/BackupControl.kt b/app/src/main/java/net/bible/android/control/backup/BackupControl.kt index 0c13b21fa3..2d77453f8a 100644 --- a/app/src/main/java/net/bible/android/control/backup/BackupControl.kt +++ b/app/src/main/java/net/bible/android/control/backup/BackupControl.kt @@ -557,7 +557,10 @@ object BackupControl { } suspend fun startBackupAppDatabase(callingActivity: ActivityBase) = withContext(Dispatchers.IO) { - val backupZipFile = makeDatabaseBackupFile()!! + val backupZipFile = makeDatabaseBackupFile()?: run { + Dialogs.showMsg2(callingActivity, R.string.error_occurred) + return@withContext + } saveDbBackupFileViaIntent(callingActivity, backupZipFile) backupZipFile.delete() }