mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Use canBeNull instead of needlessly caching MusicController for tests
This commit is contained in:
@ -42,8 +42,8 @@ namespace osu.Game.Screens.Menu
|
||||
[Resolved]
|
||||
private GameHost host { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private MusicController musicController { get; set; }
|
||||
[Resolved(canBeNull: true)]
|
||||
private MusicController music { get; set; }
|
||||
|
||||
private BackgroundScreenDefault background;
|
||||
|
||||
@ -193,7 +193,7 @@ namespace osu.Game.Screens.Menu
|
||||
//we may have consumed our preloaded instance, so let's make another.
|
||||
preloadSongSelect();
|
||||
|
||||
if (Beatmap.Value.Track != null && !musicController.IsUserPaused)
|
||||
if (Beatmap.Value.Track != null && music?.IsUserPaused != true)
|
||||
Beatmap.Value.Track.Start();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user