mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 00:49:20 +01:00
Prevent crashing when DataStack is deallocated ahead of ListMonitor and child objects
This commit is contained in:
@@ -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