From 34083baa4dc596ea1816af9d254eb816e8fe0a14 Mon Sep 17 00:00:00 2001 From: Miterosan Date: Tue, 7 Nov 2017 23:11:04 +0100 Subject: [PATCH] beatmap and line can not be null in OsuLegacyDecoder.cs --- osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index d240b7669c..0d9d875f86 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -264,6 +264,11 @@ private void decodeVariables(ref string line) private void handleEvents(Beatmap beatmap, string line, ref StoryboardSprite storyboardSprite, ref CommandTimelineGroup timelineGroup) { + if (line == null) + throw new ArgumentNullException(nameof(line)); + if (beatmap == null) + throw new ArgumentNullException(nameof(beatmap)); + var depth = 0; while (line.StartsWith(" ") || line.StartsWith("_")) {