Fix crash due to leaked ProfileHeaderView not having a

mastodonController
This commit is contained in:
Shadowfacts 2021-11-22 21:38:00 -05:00
parent 2b50609e5c
commit ca5ac8b826
1 changed files with 5 additions and 3 deletions

View File

@ -171,7 +171,9 @@ class ProfileHeaderView: UIView {
} }
private func updateRelationship() { private func updateRelationship() {
guard let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else { // todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked
guard let mastodonController = mastodonController,
let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else {
return return
} }