1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 01:14:51 +08:00

Fix crash when toggling extended statistics visibility during results load

Closes https://github.com/ppy/osu/issues/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.
This commit is contained in:
Bartłomiej Dach
2024-07-25 11:42:56 +02:00
Unverified
parent 9790c5a574
commit 8dbd4d70ff
+2 -1
View File
@@ -398,7 +398,8 @@ namespace osu.Game.Screens.Ranking
break;
case GlobalAction.Select:
StatisticsPanel.ToggleVisibility();
if (SelectedScore.Value != null)
StatisticsPanel.ToggleVisibility();
return true;
}