diff --git a/Tusker/Views/Status/BaseStatusTableViewCell.swift b/Tusker/Views/Status/BaseStatusTableViewCell.swift index ee3e567b..7e5293e5 100644 --- a/Tusker/Views/Status/BaseStatusTableViewCell.swift +++ b/Tusker/Views/Status/BaseStatusTableViewCell.swift @@ -102,7 +102,8 @@ class BaseStatusTableViewCell: UITableViewCell { .filter { [unowned self] in $0 == self.statusID } .receive(on: DispatchQueue.main) .sink { [unowned self] in - if let status = self.mastodonController.persistentContainer.status(for: $0) { + if let mastodonController = mastodonController, + let status = mastodonController.persistentContainer.status(for: $0) { self.updateStatusState(status: status) } } @@ -113,7 +114,8 @@ class BaseStatusTableViewCell: UITableViewCell { .filter { [unowned self] in $0 == self.accountID } .receive(on: DispatchQueue.main) .sink { [unowned self] in - if let account = self.mastodonController.persistentContainer.account(for: $0) { + if let mastodonController = mastodonController, + let account = mastodonController.persistentContainer.account(for: $0) { self.updateUI(account: account) } }