Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Nov 6, 2023
1 parent a229949 commit 1adcb6e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 1adcb6e

Please sign in to comment.