Fix crashing if selected ruleset doesn't have an autoplay mod.

This commit is contained in:
Lucas A
2020-06-01 17:41:04 +02:00
parent efbc02b521
commit e9b09373e7
2 changed files with 15 additions and 9 deletions

View File

@ -100,7 +100,7 @@ namespace osu.Game.Rulesets
return value;
}
public ModAutoplay GetAutoplayMod() => GetAllMods().OfType<ModAutoplay>().First();
public ModAutoplay GetAutoplayMod() => GetAllMods().OfType<ModAutoplay>().FirstOrDefault();
public virtual ISkin CreateLegacySkinProvider(ISkinSource source, IBeatmap beatmap) => null;