mirror of
https://github.com/ppy/osu
synced 2025-02-08 14:17:29 +00:00
Disallow registering a null RulesetStore
This commit is contained in:
parent
420e2c538f
commit
cf1dd1ebd3
@ -5,6 +5,7 @@ using System;
|
||||
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 @@ namespace osu.Game.Beatmaps.Formats
|
||||
/// 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
Block a user