forked from shadowfacts/Tusker
Fix crash when ProfileHeaderView leaks
This commit is contained in:
parent
804fdb439d
commit
9b33059089
|
@ -181,8 +181,11 @@ class ProfileHeaderView: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func updateUIForPreferences() {
|
@objc private func updateUIForPreferences() {
|
||||||
guard let mastodonController = mastodonController,
|
// todo: mastodonController should never be nil, but ProfileHeaderViews are getting leaked
|
||||||
let account = mastodonController.persistentContainer.account(for: accountID) else {
|
guard let mastodonController = mastodonController else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
guard let account = mastodonController.persistentContainer.account(for: accountID) else {
|
||||||
fatalError("Missing cached account \(accountID!)")
|
fatalError("Missing cached account \(accountID!)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue