From 29aed65b998e097222fada21e000c839d28c162f Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 15 Aug 2020 17:59:14 -0400 Subject: [PATCH] Fix crash if profile header view outlives VC --- Tusker/Views/Profile Header/ProfileHeaderView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Tusker/Views/Profile Header/ProfileHeaderView.swift b/Tusker/Views/Profile Header/ProfileHeaderView.swift index c0ce4bb5..a22cd242 100644 --- a/Tusker/Views/Profile Header/ProfileHeaderView.swift +++ b/Tusker/Views/Profile Header/ProfileHeaderView.swift @@ -93,6 +93,7 @@ class ProfileHeaderView: UIView { func updateUI(for accountID: String) { self.accountID = accountID + guard let mastodonController = mastodonController else { return } guard let account = mastodonController.persistentContainer.account(for: accountID) else { fatalError("Missing cached account \(accountID)") }