mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-11-17 14:21:16 +01:00
Prevent crashing when DataStack is deallocated ahead of ListMonitor and child objects
This commit is contained in:
1 parent
30ab4386bf
commit
9f397b4337
2 files changed
+19
-4
No files matched your search
@@ -963,8 +963,15 @@ public final class ListMonitor<D: DynamicObject>: Hashable {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
try! newFetchedResultsController.performFetchFromSpecifiedStores()
|
||||
do {
|
||||
|
||||
try newFetchedResultsController.performFetchFromSpecifiedStores()
|
||||
}
|
||||
catch {
|
||||
|
||||
// DataStack may have been deallocated
|
||||
return
|
||||
}
|
||||
self.fetchedResultsControllerDelegate.taskGroup.notify(queue: .main) {
|
||||
|
||||
self.fetchedResultsControllerDelegate.enabled = false
|
||||
|
||||
Reference in new issue
Block a user