mirror of https://github.com/ppy/osu
Disallow registering a null `RulesetStore`
This commit is contained in:
parent
420e2c538f
commit
cf1dd1ebd3
|
@ -5,6 +5,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
|
@ -42,9 +43,9 @@ static Decoder()
|
|||
/// Register dependencies for use with static decoder classes.
|
||||
/// </summary>
|
||||
/// <param name="rulesets">A store containing all available rulesets (used by <see cref="LegacyBeatmapDecoder"/>).</param>
|
||||
public static void RegisterDependencies(RulesetStore rulesets)
|
||||
public static void RegisterDependencies([NotNull] RulesetStore rulesets)
|
||||
{
|
||||
LegacyBeatmapDecoder.RulesetStore = rulesets;
|
||||
LegacyBeatmapDecoder.RulesetStore = rulesets ?? throw new ArgumentNullException(nameof(rulesets));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue