Skip to content

Commit

Permalink
GameActionManager now performs delayed updates on main thread (#364)
Browse files Browse the repository at this point in the history
linked crash reports
- Xcode Organizer
  - Crash report batch #1, consisting of 4 crash reports from a single
    device (an iPhone 8) running iOS 14.4.
- Crashlytics
  - Crash report batch #2, consisting of 1 crash report from an iPhone 8
    device running iOS 14.4.

all crashes occurred in method updateNavigationBarWidths of
NavigationBarControllerPhonePortraitOnly, on this line:
  [self.view removeConstraints:constraintsToRemove];
  • Loading branch information
herzbube committed Mar 12, 2021
1 parent 789ee44 commit 8135976
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/play/gameaction/GameActionManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,11 @@ - (void) delayedUpdate
{
if ([LongRunningActionCounter sharedCounter].counter > 0)
return;
if ([NSThread currentThread] != [NSThread mainThread])
{
[self performSelectorOnMainThread:@selector(delayedUpdate) withObject:nil waitUntilDone:YES];
return;
}
[self updateVisibleStates];
[self updateEnabledStates];
[self updateScoringMode];
Expand Down

0 comments on commit 8135976

Please sign in to comment.