Fix crash on changing play mode too early.

This commit is contained in:
Dean Herbert
2017-04-05 10:15:39 +09:00
parent cbb669add3
commit 8173d01d78

View File

@ -167,13 +167,12 @@ namespace osu.Game.Screens.Select
BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, promptDelete, Key.Number4, float.MaxValue);
}
if (osu != null)
playMode.BindTo(osu.PlayMode);
playMode.ValueChanged += val => Beatmap.PreferredPlayMode = val;
if (database == null)
database = beatmaps;
playMode.ValueChanged += val => { if (Beatmap != null) Beatmap.PreferredPlayMode = val; };
if (osu != null) playMode.BindTo(osu.PlayMode);
database.BeatmapSetAdded += onBeatmapSetAdded;
database.BeatmapSetRemoved += onBeatmapSetRemoved;