mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Fix potential nullref.
This commit is contained in:
@ -89,12 +89,12 @@ namespace osu.Game.Screens.Play
|
||||
if (Beatmap == null)
|
||||
Beatmap = beatmaps.GetWorkingBeatmap(BeatmapInfo, withStoryboard: true);
|
||||
|
||||
if ((Beatmap?.Beatmap?.HitObjects.Count ?? 0) == 0)
|
||||
throw new Exception("No valid objects were found!");
|
||||
|
||||
if (Beatmap == null)
|
||||
if (Beatmap?.Beatmap == null)
|
||||
throw new Exception("Beatmap was not loaded");
|
||||
|
||||
if (Beatmap?.Beatmap?.HitObjects.Count == 0)
|
||||
throw new Exception("No valid objects were found!");
|
||||
|
||||
ruleset = osu?.Ruleset.Value ?? Beatmap.BeatmapInfo.Ruleset;
|
||||
rulesetInstance = ruleset.CreateInstance();
|
||||
|
||||
|
Reference in New Issue
Block a user