From cf1dd1ebd3fd4b849ed5249017363949f2112ea7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Feb 2022 16:48:42 +0900 Subject: [PATCH] Disallow registering a null `RulesetStore` --- osu.Game/Beatmaps/Formats/Decoder.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/Formats/Decoder.cs b/osu.Game/Beatmaps/Formats/Decoder.cs index 8eb238a184..c1537d7240 100644 --- a/osu.Game/Beatmaps/Formats/Decoder.cs +++ b/osu.Game/Beatmaps/Formats/Decoder.cs @@ -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. /// /// A store containing all available rulesets (used by ). - public static void RegisterDependencies(RulesetStore rulesets) + public static void RegisterDependencies([NotNull] RulesetStore rulesets) { - LegacyBeatmapDecoder.RulesetStore = rulesets; + LegacyBeatmapDecoder.RulesetStore = rulesets ?? throw new ArgumentNullException(nameof(rulesets)); } ///