diff --git a/Tusker/Views/Profile Header/ProfileHeaderView.swift b/Tusker/Views/Profile Header/ProfileHeaderView.swift index 1004ca5876..a56e7e7361 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderView.swift @@ -86,6 +86,11 @@ class ProfileHeaderView: UIView { } private func createObservers() { + // mastodonController may be nil if the ProfileViewController is deinit'd before the header is even created + guard let mastodonController else { + return + } + cancellables = [] mastodonController.persistentContainer.accountSubject