Don't crash when saving persistent store fails

This commit is contained in:
Shadowfacts 2022-04-25 18:49:45 -04:00
parent 8c888906c9
commit 360f52d0cf
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class MainSceneDelegate: UIResponder, UIWindowSceneDelegate {
rootVC.sceneDidEnterBackground()
}
try! scene.session.mastodonController?.persistentContainer.viewContext.save()
try? scene.session.mastodonController?.persistentContainer.viewContext.save()
}
private func handlePendingCrashReport(_ report: PLCrashReport, session: UISceneSession) {