Skip to content

Commit

Permalink
Fix crash when toggling extended statistics visibility during results…
Browse files Browse the repository at this point in the history
… load

Closes #29066.

Initially I fixed this at where the assert is right now:

	https://github.com/ppy/osu/blob/9790c5a574b782c41c8c6da99ad8c42dfadc9de8/osu.Game/Screens/Ranking/ResultsScreen.cs#L333

but because of the weird way that visible state management is done in
this screen that made it possible for the extended statistics to be
visible *behind* the score panels, without the score panels making way
for it. So this is in a way safer, because it prevents the visibility
state of the extended statistics from changing in the first place if
there is no score selected (yet).

This can be also seen in playlists, at least.
  • Loading branch information
bdach committed Jul 25, 2024
1 parent 9790c5a commit 8dbd4d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osu.Game/Screens/Ranking/ResultsScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
break;

case GlobalAction.Select:
StatisticsPanel.ToggleVisibility();
if (SelectedScore.Value != null)
StatisticsPanel.ToggleVisibility();
return true;
}

Expand Down

0 comments on commit 8dbd4d7

Please sign in to comment.