mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 04:48:04 +09:00
Merge pull request #2533 from peppy/fix-wedge-nullref
Fix nullref when changing ruleset at main menu
This commit is contained in:
commit
07fc71e077
@ -88,17 +88,27 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void loadBeatmap()
|
private void loadBeatmap()
|
||||||
{
|
{
|
||||||
|
void updateState()
|
||||||
|
{
|
||||||
|
State = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
||||||
|
|
||||||
|
Info?.FadeOut(250);
|
||||||
|
Info?.Expire();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (beatmap == null)
|
||||||
|
{
|
||||||
|
updateState();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LoadComponentAsync(new BufferedWedgeInfo(beatmap, ruleset.Value)
|
LoadComponentAsync(new BufferedWedgeInfo(beatmap, ruleset.Value)
|
||||||
{
|
{
|
||||||
Shear = -Shear,
|
Shear = -Shear,
|
||||||
Depth = Info?.Depth + 1 ?? 0,
|
Depth = Info?.Depth + 1 ?? 0,
|
||||||
}, newInfo =>
|
}, newInfo =>
|
||||||
{
|
{
|
||||||
State = beatmap == null ? Visibility.Hidden : Visibility.Visible;
|
updateState();
|
||||||
|
|
||||||
Info?.FadeOut(250);
|
|
||||||
Info?.Expire();
|
|
||||||
|
|
||||||
Add(Info = newInfo);
|
Add(Info = newInfo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user