1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 13:22:55 +08:00

Fixed null references

This commit is contained in:
MrTheMake 2017-05-21 17:20:20 +02:00
parent 7db45cb58f
commit 34653eb8c0

View File

@ -57,9 +57,9 @@ namespace osu.Game.Screens.Select
{
beatmap?.Mods.BindTo(modSelect.SelectedMods);
if (Beatmap != null) Beatmap.Track.Looping = false;
if (Beatmap != null && Beatmap.Track != null) Beatmap.Track.Looping = false;
beatmapDetails.Beatmap = beatmap;
if(beatmap != null) beatmap.Track.Looping = true;
if(beatmap != null && beatmap.Track != null) beatmap.Track.Looping = true;
base.OnBeatmapChanged(beatmap);
}
@ -90,7 +90,7 @@ namespace osu.Game.Screens.Select
if (base.OnExiting(next))
return true;
if(Beatmap != null) Beatmap.Track.Looping = false;
if(Beatmap != null && Beatmap.Track != null) Beatmap.Track.Looping = false;
return false;
}