Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash from potentially calling removeObserver multiple times. #4607

Merged
merged 2 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Changes to be released in next version
* Room: Fixed mentioning users from room info member details (#4583)
* Settings: Disabled autocorrection when entering an identity server (#4593).
* Room Notification Settings: Fix Crash when opening the new Room Notification Settings Screen (Not yet released) (#4599).
* AuthenticationViewController: Fix crash on authentication if an intermediate view was presented (#4606).

⚠️ API Changes
*
Expand Down
4 changes: 2 additions & 2 deletions Riot/Modules/Authentication/AuthenticationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ - (void)viewDidDisappear:(BOOL)animated
{
[_keyboardAvoider stopAvoiding];

[self.authenticationActivityIndicator removeObserver:self forKeyPath:@"hidden"];

[super viewDidDisappear:animated];
}

Expand Down Expand Up @@ -384,6 +382,8 @@ - (void)destroy
[[NSNotificationCenter defaultCenter] removeObserver:universalLinkDidChangeNotificationObserver];
universalLinkDidChangeNotificationObserver = nil;
}

[self.authenticationActivityIndicator removeObserver:self forKeyPath:@"hidden"];

autoDiscovery = nil;
_keyVerificationCoordinatorBridgePresenter = nil;
Expand Down