diff --git a/Tusker/Views/Profile Header/ProfileHeaderView.swift b/Tusker/Views/Profile Header/ProfileHeaderView.swift index 484c3a2d9f..9d6df349bc 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderView.swift @@ -181,8 +181,11 @@ class ProfileHeaderView: UIView { } @objc private func updateUIForPreferences() { - guard let mastodonController = mastodonController, - let account = mastodonController.persistentContainer.account(for: accountID) else { + // todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked + guard let mastodonController = mastodonController else { + return + } + guard let account = mastodonController.persistentContainer.account(for: accountID) else { fatalError("Missing cached account \(accountID!)") }