diff --git a/Tusker/Views/Profile Header/ProfileHeaderView.swift b/Tusker/Views/Profile Header/ProfileHeaderView.swift index 6f98c6bc..3fc9bc6e 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderView.swift @@ -171,9 +171,11 @@ class ProfileHeaderView: UIView { } private func updateRelationship() { - guard let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else { - return - } + // todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked + guard let mastodonController = mastodonController, + let relationship = mastodonController.persistentContainer.relationship(forAccount: accountID) else { + return + } followsYouLabel.isHidden = !relationship.followedBy }