Fix crash due to leaked table view cell

This commit is contained in:
Shadowfacts 2020-08-16 15:06:19 -04:00
parent 1cd3e6adf9
commit 0986fa285e
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ class TimelineStatusTableViewCell: BaseStatusTableViewCell {
.filter { [unowned self] in $0 == self.rebloggerID }
.receive(on: DispatchQueue.main)
.sink { [unowned self] in
if let reblogger = self.mastodonController.persistentContainer.account(for: $0) {
if let mastodonController = self.mastodonController,
let reblogger = mastodonController.persistentContainer.account(for: $0) {
self.updateRebloggerLabel(reblogger: reblogger)
}
}