mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 17:32:54 +08:00
Attempt to fix nullref warning.
This commit is contained in:
parent
2b3b3b7255
commit
d6ccc66b23
@ -6,7 +6,6 @@ using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps.IO;
|
||||
|
@ -14,9 +14,6 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
|
||||
public void PostProcess(Beatmap<OsuHitObject> beatmap)
|
||||
{
|
||||
if ((beatmap.ComboColors?.Count ?? 0) == 0)
|
||||
return;
|
||||
|
||||
int comboIndex = 0;
|
||||
int colourIndex = 0;
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public BeatmapInfo BeatmapInfo;
|
||||
public List<ControlPoint> ControlPoints;
|
||||
public List<Color4> ComboColors = new List<Color4>
|
||||
public readonly List<Color4> ComboColors = new List<Color4>
|
||||
{
|
||||
new Color4(17, 136, 170, 255),
|
||||
new Color4(102, 136, 0, 255),
|
||||
|
@ -11,6 +11,7 @@ using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Screens.Play;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
@ -52,6 +53,8 @@ namespace osu.Game.Modes.UI
|
||||
|
||||
protected HitRenderer(WorkingBeatmap beatmap)
|
||||
{
|
||||
Debug.Assert(beatmap != null, "HitRenderer initialized with a null beatmap.");
|
||||
|
||||
// Convert + process the beatmap
|
||||
Beatmap = CreateBeatmapConverter().Convert(beatmap.Beatmap);
|
||||
Beatmap.HitObjects.ForEach(CreateBeatmapProcessor().SetDefaults);
|
||||
|
Loading…
Reference in New Issue
Block a user