mirror of
https://github.com/osukey/osukey.git
synced 2025-06-29 23:28:00 +09:00
Fix possible nullref when exiting song select too fast
This commit is contained in:
parent
e3cb6f45f5
commit
7fa0ac6ed7
@ -152,6 +152,14 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
AddUntilStep("wait for track", () => !Game.MusicController.CurrentTrack.IsDummyDevice && Game.MusicController.IsPlaying);
|
AddUntilStep("wait for track", () => !Game.MusicController.CurrentTrack.IsDummyDevice && Game.MusicController.IsPlaying);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPushSongSelectAndPressBackButtonImmediately()
|
||||||
|
{
|
||||||
|
AddStep("push song select", () => Game.ScreenStack.Push(new TestPlaySongSelect()));
|
||||||
|
AddStep("press back button", () => Game.ChildrenOfType<BackButton>().First().Action());
|
||||||
|
AddWaitStep("wait two frame", 2);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestExitSongSelectWithClick()
|
public void TestExitSongSelectWithClick()
|
||||||
{
|
{
|
||||||
|
@ -665,7 +665,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public override bool OnBackButton()
|
public override bool OnBackButton()
|
||||||
{
|
{
|
||||||
if (ModSelect.State.Value == Visibility.Visible)
|
if (ModSelect?.State.Value == Visibility.Visible)
|
||||||
{
|
{
|
||||||
ModSelect.Hide();
|
ModSelect.Hide();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user